This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Servlets and the fly likes Exhausted Resultset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Exhausted Resultset" Watch "Exhausted Resultset" New topic
Author

Exhausted Resultset

mohana konakanchi
Ranch Hand

Joined: May 16, 2001
Posts: 67
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

Joined: Jul 11, 2001
Posts: 254
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

Joined: May 16, 2001
Posts: 67
Thank you.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exhausted Resultset
 
Similar Threads
ojdbc thin client - eclipse error in debug mode
jdbc resultset to xml
StackOverflow error while retreiving data
unable to access data simultaneously
error - exhausted result set