• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Resultset Exhausted Exception

 
Grishma Dube
Ranch Hand
Posts: 275
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,
I am getting following exception :-
java.sql.SQLException: Exhausted Resultset
while retrieving values from resultset. I am trying to retrieve values for multiple users but getting this exception only for one user and for others it is working fine.

Can anyone help me???
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34071
331
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Grishma,
It looks like you are never getting a match to set the boolean to false and end the loop. When hResultSetQL.next() gets called after it has run out of data, you get the error.
It is good to use a while(hResultSetQL.next()) loop. That removes any possibility of running out of result set. Also, note that resultsets are never null after returning from the database. They can be empty, but not null.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic