permaculture playing cards
The moose likes JDBC and Relational Databases and the fly likes statement N connection 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 "statement N connection" Watch "statement N connection" New topic
Author

statement N connection

eswar kumar
Ranch Hand

Joined: Oct 20, 2002
Posts: 98
what happens if forgot to close both connection and statement ?
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 32501
    
214

That could slow down your future db connections until the connections are reclaimed.


[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
Daniel Moore
Ranch Hand

Joined: Dec 12, 2003
Posts: 31
Databases have a limited number of connections available. When you close a JDBC connection, you tell the driver to release the database connection. If you don't, you may run out of database connections. What happens after that is implementation dependent, but generally not good.


<a href="http://www.mooreds.com/weblog/" target="_blank" rel="nofollow">http://www.mooreds.com/weblog/</a>
 
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
 
subject: statement N connection
 
It's not a secret anymore!