• Post Reply Bookmark Topic Watch Topic
  • New Topic

Exhausted Resultset

 
Joey Alencar
Ranch Hand
Posts: 43
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I execute a query this message appears:
"Error Message: Exhausted Resultset". I'd like to know what make it happens.
Thanks.
 
Mike Curwen
Ranch Hand
Posts: 3695
IntelliJ IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That usually happens when you try to read past the end of the resultset.

If you place your resultset reading code inside of a while (rs.next()) { } you should be fine.
 
Beksy Kurian
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It means the Oracle result set you are using is closed.
For example, it will happen if you issue a query then close the
Statement before using the ResultSet. Open a
new statement before each request, then close it after use.
the following is from oracle technet site:
What does "Exhausted Resultset: prepare_for_new_get" means?
This error happens if you try to use a ResultSet after you close it. It also happens if you close the statement that created the ResultSet.
ResultSet rset = stmt.executeQuery ("select ROWID from EMP");
...
rset.close (); // or stmt.close ();
rset.getString (1);
Regards
Beksy
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!