This week's book giveaway is in the OCMJEA forum.
We're giving away four copies of OCM Java EE 6 Enterprise Architect Exam Guide and have Paul Allen & Joseph Bambara on-line!
See this thread for details.
The moose likes Servlets and the fly likes error - exhausted result set Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCM Java EE 6 Enterprise Architect Exam Guide this week in the OCMJEA forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "error - exhausted result set" Watch "error - exhausted result set" New topic
Author

error - exhausted result set

Tracy Zoller
Greenhorn

Joined: Dec 11, 2002
Posts: 4
I'm getting an error message that I have exhausted my resultset, how do I get around this? I'm trying to first search for an applicant by ssn, then display the applicant's info which is no problem but then I want to be able to go to a new page to edit the applicant's data and I get error 'exhausted result set'? Can anyone help?
Bosun Bello
Ranch Hand

Joined: Nov 06, 2000
Posts: 1510
You might want to close the resultset since you are done with it. You can edit/make updates to teh data and then make an update to the DB.


Bosun (SCJP, SCWCD)
So much trouble in the world -- Bob Marley
Cory Wilkerson
Ranch Hand

Joined: Aug 14, 2001
Posts: 84
Tracy,
My guess is that you've got a reference to a forward-only ResultSet (ResultSets can be acquired in many different flavors) and you've "exhausted" the ResultSet by scrolling to the end of the thing using your normal, iterative construct:

I'm now assuming you have a reference to that same ResultSet object on your next page and you're either trying to iterate to the record for updating purposes or, attempting to modify a record although your cursor has reached the end of the ResultSet.
Just something to look at...but I'm fairly sure you're attempting to scroll through a ResultSet that you've already burned through.
Arun Prasad Namasivayam
Greenhorn

Joined: Jan 02, 2003
Posts: 5
tracy,
This error is coming because ur query didnt retrieve any values,its empty, then only the error Exhausted ResultSet error will come.
arun
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error - exhausted result set