aspose file tools*
The moose likes JDBC 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
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
internet detective
Marshal

Joined: May 26, 2003
Posts: 30324
    
150

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.


[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
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
 
jQuery in Action, 2nd edition
 
subject: JDBC result set question