• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Exhausted Resultset

 
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 254
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you.
 
Poop goes in a willow feeder. Wipe with this tiny ad:
the value of filler advertising in 2021
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic