Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

JDBC result set question

 
Raj Prasad
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Sheriff
Posts: 35976
422
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
sajja bala
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Raj

Yes you have an option; if you closed the connection also. I know that by using the rowset it is possible
 
Happiness is not a goal ... it's a by-product of a life well lived - Eleanor Roosevelt. Tiny ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!