Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Resultset Exhausted

 
Rahul Juneja
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,

Was just wondering if anybody could suggest anything as I am getting a resultset Exhausted exception and my query returned 1 record when directly executed thru oracle client.


[ July 13, 2005: Message edited by: Rahul Juneja ]
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34178
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rahul,
Try printing out the value of rs.next(). If it displays false, as I suspect it does, there are no [more] rows and you are calling rs.getLong() on an invalid row.
 
Rahul Juneja
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks dude but i found the problem.
 
Sonny Gill
Ranch Hand
Posts: 1211
IntelliJ IDE Mac
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Rahul Juneja:
Thanks dude but i found the problem.


And the problem was...
 
Rahul Juneja
Ranch Hand
Posts: 425
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Actually, I was using a seperate thread for committing certain process and again trying to access the commited data from the main thread, so sometimes the thread used for committing data is not yet finished and the main thread tries to access that data.


Okay, If you can answer my this question as When we call commit on a transaction context which has lot of changes done and all are to be commited will the control be given to a seperate database thread automatically.

Cheeers,
Rahul
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic