This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Resultset Exhausted Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Resultset Exhausted" Watch "Resultset Exhausted" New topic

Resultset Exhausted

Rahul Juneja
Ranch Hand

Joined: Aug 03, 2002
Posts: 425
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 ]

Rahul Juneja
ThoughtClicks -
Jeanne Boyarsky
internet detective

Joined: May 26, 2003
Posts: 30136

Try printing out the value of If it displays false, as I suspect it does, there are no [more] rows and you are calling rs.getLong() on an invalid row.

[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Rahul Juneja
Ranch Hand

Joined: Aug 03, 2002
Posts: 425
Thanks dude but i found the problem.
Sonny Gill
Ranch Hand

Joined: Feb 02, 2002
Posts: 1211

Originally posted by Rahul Juneja:
Thanks dude but i found the problem.

And the problem was...

The future is here. It's just not evenly distributed yet. - William Gibson
Consultant @ Xebia. Sonny Gill Tweets
Rahul Juneja
Ranch Hand

Joined: Aug 03, 2002
Posts: 425
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.

jQuery in Action, 2nd edition
subject: Resultset Exhausted
Similar Threads
executeUpdate not updating and no exception thrown
Hibernate loses precision when persisting util.Date as timestamp
Awkward Memory Issues
Please Point Out My Mistakes
Inner Class - Help Required