• Post Reply Bookmark Topic Watch Topic
  • New Topic

statement N connection  RSS feed

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what happens if forgot to close both connection and statement ?
 
author & internet detective
Marshal
Posts: 38394
650
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That could slow down your future db connections until the connections are reclaimed.
 
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!