• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQl.SQLException - Exhausted Resultset .. please help

 
howie jao
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

Below is my code.
RETRIEVE_CONTENTID_FROM_CSTSITE_ENTITY = select a,b,c,d,e,f,g,h from xx_table where id = ?

I received error on the 2nd GetLong() ...line 22

Please help and thanks in advanced.

Howie

 
howie jao
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please remove the post. I have found the error thanks.
 
Rob Spoor
Sheriff
Pie
Posts: 20745
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
We don't just remove threads because they are solved. Others may learn from our mistakes. Which is why I would like you to share your solution with us, please.

Also, you have some code duplication there, with adding the longs. Perhaps you'd like to make methods out of those:
 
Wendy Gibbons
Bartender
Posts: 1111
Eclipse IDE Oracle VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
he missed {} on the while statement
 
Rob Spoor
Sheriff
Pie
Posts: 20745
68
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Indeed so, I missed that. As a result, only the rs.getLong("a") statement is inside the loop. All others are executed after the loop has ended and you've already gone through all records.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic