Geeks Talk

Prepare for your Next Interview




Why we have to close connection, statement, prepared statement

This is a discussion on Why we have to close connection, statement, prepared statement within the Java forums, part of the Software Development category; Why we have to close connection, statement, prepared statement, What will happen if we dont close staement and prepared statement Question asked by visitor sreedhar...


Go Back   Geeks Talk > Software Development > Java

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 05-05-2007
Expert Member
 
Join Date: Feb 2007
Posts: 1,279
Thanks: 0
Thanked 155 Times in 134 Posts
Geek_Guest is on a distinguished roadGeek_Guest is on a distinguished road
Why we have to close connection, statement, prepared statement

Why we have to close connection, statement, prepared statement, What will happen if we dont close staement and prepared statement

Question asked by visitor sreedhar
Reply With Quote
The Following User Says Thank You to Geek_Guest For This Useful Post:
Sponsored Links
  #2 (permalink)  
Old 06-15-2007
Junior Member
 
Join Date: Jun 2007
Location: india
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
bharanikumariyer is on a distinguished road
Re: Why we have to close connection, statement, prepared statement

then only trafic conjuction will be avoided
Reply With Quote
  #3 (permalink)  
Old 06-18-2007
Junior Member
 
Join Date: May 2007
Location: Mysore
Posts: 16
Thanks: 1
Thanked 0 Times in 0 Posts
umeshap is on a distinguished road
Re: Why we have to close connection, statement, prepared statement

for security reasons
Reply With Quote
  #4 (permalink)  
Old 06-27-2007
Junior Member
 
Join Date: Jun 2007
Location: pune
Posts: 13
Thanks: 5
Thanked 0 Times in 0 Posts
satishk is on a distinguished road
Smile Re: Why we have to close connection, statement, prepared statement

once we aquire the result.we no more need the connection.So inorder to improve safety of u r application and performance u need to close the connection.
Reply With Quote
  #5 (permalink)  
Old 06-30-2007
Junior Member
 
Join Date: Jun 2007
Location: Mumbai
Posts: 24
Thanks: 9
Thanked 1 Time in 1 Post
Sampath_Java is on a distinguished road
Re: Why we have to close connection, statement, prepared statement

Without close connection, it may be affect another object.
so we need close connection/stmt/pmst.

share if another reason
Reply With Quote
  #6 (permalink)  
Old 10-19-2007
Junior Member
 
Join Date: Jul 2007
Posts: 4
Thanks: 0
Thanked 2 Times in 2 Posts
rajeshnarkhed is on a distinguished road
Re: Why we have to close connection, statement, prepared statement

not closing connections to DB server will soon result in no managed connections available exception i.e. other threads/programs needing to use connections will not find any as all connections are already in use (not closed)
Reply With Quote
  #7 (permalink)  
Old 10-19-2007
Moderator
 
Join Date: Jun 2007
Location: Bangalore,India
Posts: 1,330
Thanks: 7
Thanked 120 Times in 108 Posts
debasisdas will become famous soon enoughdebasisdas will become famous soon enough
Re: Why we have to close connection, statement, prepared statement

For beter managemnet of objects. again it is always recommended to close the connection for security reason.
Reply With Quote
The Following User Says Thank You to debasisdas For This Useful Post:
  #8 (permalink)  
Old 10-24-2007
Junior Member
 
Join Date: Jan 2007
Location: delhi
Posts: 22
Thanks: 0
Thanked 1 Time in 1 Post
prakash_13dec is on a distinguished road
Re: Why we have to close connection, statement, prepared statement

having connections open is like programmer sitting on beach(doing nothing) now wud that not be a waste of resource?
Reply With Quote
  #9 (permalink)  
Old 02-27-2008
Junior Member
 
Join Date: Feb 2008
Location: Noida
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
rajeevchaturvedi2007 is on a distinguished road
Re: Why we have to close connection, statement, prepared statement

Hi ,
Holding any ref. un-necessary will impact on system.
When you claose connection etc. , its available for Garbage Collection.
Reply With Quote
Reply

  Geeks Talk > Software Development > Java


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
Is this a correct statement anoop4real C and C++ 13 05-22-2008 06:22 AM
C/C++ Programming : Limitations of switch statement Lokesh M C and C++ 1 07-17-2007 02:38 AM
How many Case statments can i use in Switch Statement Geek_Guest C and C++ 9 07-03-2007 04:56 AM
SQL queries inside Callable Statement Geek_Guest SQL 1 05-04-2007 08:49 AM
Rules for COPY statement norman MainFrame 1 08-14-2006 04:11 AM


All times are GMT -4. The time now is 10:13 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved