Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) 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
Sheriff
Posts: 35977
422
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
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!