This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes JDBC and the fly likes Can we close the connection After getting the resultset.. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Can we close the connection After getting the resultset.." Watch "Can we close the connection After getting the resultset.." New topic
Author

Can we close the connection After getting the resultset..

jaya repaka
Greenhorn

Joined: Nov 06, 2003
Posts: 18
Hi,
My Question seems to be silly but I would like to know the answer.
Can we close the connection after getting the resultset if we have 1000's records.

If we close the connection what will be impact?


Thanks
Vani
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 29220
    
135

Vani,
No. You need to get the results before you close the connection. You can copy them to another data structure and do the processing afterwards though.


[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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Can we close the connection After getting the resultset..
 
Similar Threads
accessing resultSet
consuquences of not closing ResultSet?
Does ResultSet close when connection closes?
ResultSet after DB closed
whats the use of closing ResultSet ?