aspose file tools*
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
JavaRanch » Java Forums » Databases » JDBC
Bookmark "ResultSet Exhausted" Watch "ResultSet Exhausted" New topic
Author

ResultSet Exhausted

Ayan Biswas
Ranch Hand

Joined: Jul 10, 2010
Posts: 104

What is wrong with the above code?Please help!!!


AyanBiswas
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61766
    
  67

Are you serious? Are you getting an error? What is it you want us to look for?

Also, please be sure to use code tags when posting code to the forums. Unformatted or unindented code is extremely hard to read and many people that might be able to help you will just move along to posts that are easier to read. Please click this link ⇒ UseCodeTags ⇐ for more information. Properly indented and formatted code greatly increases the probability that your question will get quicker, better answers.

And, please be sure to take the time to compose descriptive subjects for your posts. You will attract people who will can give you better and faster answers when your posts have good, descriptive subjects. For more information, please click this link ⇒ UseAMeaningfulSubjectLine. You can change your subject line by clicking the button on your post.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31069
    
232

One thing that's wrong is the following:



There needs to be in between.


[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
Ayan Biswas
Ranch Hand

Joined: Jul 10, 2010
Posts: 104
It is still not working.it is throwing the following exception:
Exception in thread "main" java.sql.SQLException: Exhausted Resultset
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

1) have you read the API for the ResultSet next() method?
2) what do you think the error means?

The ResultsSet class behaviour for cursors and the use of the 'next' method is important but not too difficult a concept. It is however something you'll need to look up and understand.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 31069
    
232

There also needs to be an if statement in between.

Rather than saying you are still getting the error, it would be helpful to show the updated code.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ResultSet Exhausted