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

ResultSet and connection

 
Chris Bojinca
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Maybe this is a dumb question but ... when a you retrieve a ResultSet and start processing it do you need the connection or not?
I guess the point is when you process the ResultSet do you need the connection opened?
Thanks.
 
Jeanne Boyarsky
author & internet detective
Sheriff
Posts: 35969
422
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris,
Yes, you need the connection open. The resultset object doesn't get all the data at once for large resultsets. So it could still need the connection to get more data.
 
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!