Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

statement N connection

 
eswar kumar
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 ?
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34973
379
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.
 
Daniel Moore
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