Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

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 Blogs FAQ Tag Cloud Calendar Mark Forums Read

Java Java related Issues and Problems

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-05-2007
Expert Member
 
Join Date: Feb 2007
Posts: 1,279
Thanks: 0
Thanked 192 Times in 154 Posts
Geek_Guest has a spectacular aura aboutGeek_Guest has a spectacular aura aboutGeek_Guest has a spectacular aura about
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 1 Time in 1 Post
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: Chennai
Posts: 25
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 3 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,853
Thanks: 9
Thanked 168 Times in 142 Posts
debasisdas has a spectacular aura aboutdebasisdas has a spectacular aura about
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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

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


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


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2009 GeekInterview.com. All Rights Reserved