wood burning stoves 2.0*
The moose likes JDBC and the fly likes How To Solve : java.sql.SQLException: Exhausted Resultset Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "How To Solve : java.sql.SQLException: Exhausted Resultset" Watch "How To Solve : java.sql.SQLException: Exhausted Resultset" New topic
Author

How To Solve : java.sql.SQLException: Exhausted Resultset

kayanaat sidiqui
Ranch Hand

Joined: Sep 04, 2008
Posts: 122
Hi,

I have written a piece of code where i got this exception--

Exception in thread "main" java.sql.SQLException: Exhausted Resultset
at oracle.jdbc.driver.SQLStateMapping.newSQLException(SQLStateMapping.java:70)
at oracle.jdbc.driver.DatabaseError.newSQLException(DatabaseError.java:131)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:197)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:261)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:269)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:490)
at oracle.jdbc.driver.OracleResultSetImpl.getString(OracleResultSetImpl.java:857)


The code is written in this fashion--



Even though i tried with making rs1 and cs1 null and used it inplace of rest cs and rs.

But again got the same exception.

Could you please help me out?

Thanks,
Kaya.
Kalabaw moo
Ranch Hand

Joined: May 26, 2009
Posts: 61
rs.next() or rs1.next()?



Edit: should you put a try...catch block for the ResultSet?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36478
    
  16
Moving to JDBC forum.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How To Solve : java.sql.SQLException: Exhausted Resultset
 
Similar Threads
Error occured while initialising for loop:
Newbie question... :(
java.sql.SQLException... Need help!!!
Retrive 4000 more records
java.sql.SQLException: Closed Connection