Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Exhausted Resultset

 
mohana konakanchi
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am facing a problem while fetching data from ORACLE 8.06 database from a java class. I am using an oracle thin JDBC driver.
I repeatedly get an "Exhausted Resultset: prepare_for_new_get" error message.
I get this though I have taken care to close the result set only after fetching all the data.

while(rs.next()) {
// Fetch data into vector;
}
rs.close();

The error is not consistant because with the same query which produced this error message I sometimes get the correct results too.

Any help in this appreciated.
Mohana
 
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
 
mohana konakanchi
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic