This week's book giveaway is in the OO, Patterns, UML and Refactoring forum.
We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line!
See this thread for details.
The moose likes JDBC and Relational Databases and the fly likes JDBC result set question Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "JDBC result set question" Watch "JDBC result set question" New topic
Author

JDBC result set question

Raj Prasad
Greenhorn

Joined: Jan 25, 2006
Posts: 7
I Executed a query and it has 10000 records. After processing for 9990 records, i closed my connection object and i got an exception immediately
can not access the ResultSet object anymore.

Is there any JDBC API still using which i can retrieve all the records 10000 records though the connection is closed at 9990.

Thanks,
Raj
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32481
    
214

Raj,
I'm confused. Why are you closing the connection if you aren't done with the data? You could use a cached result set, but it seems better to just get the rest of the data before closing the connection.


[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
sajja bala
Greenhorn

Joined: Dec 12, 2007
Posts: 11
Hello Raj

Yes you have an option; if you closed the connection also. I know that by using the rowset it is possible


Have a Good Day........<br />Sajj Bala Subrahmanyam
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JDBC result set question
 
jQuery in Action, 3rd edition