ASP Hosting sale!
Double disk space and transfer for FREE!
Limited time offer! Act Now!

aspdev | articles | tutorials | forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Closing ADO resordset and database connection objects

 
Post new topic   Reply to topic    ASPdev.org Forum Index -> ASP programming
View previous topic :: View next topic  
Author Message
steve1



Joined: 17 Feb 2005
Posts: 2

PostPosted: Thu Feb 17, 2005 9:57 am    Post subject: Closing ADO resordset and database connection objects Reply with quote

Hi,

Do I need to close my ADO resordset and database connection objects on my ASP pages? If I have to, where & when is the best to close them?



Steve
Back to top
View user's profile Send private message
anandham



Joined: 18 Feb 2005
Posts: 1
Location: Mumbai

PostPosted: Fri Feb 18, 2005 8:36 am    Post subject: U should close the connections & recordset Reply with quote

Hi Steve,
Obviously we should close the ADO recordset & connection string..
i we keep opening the connections then it will always be in open condition only & affects the other connections. Let say there is an application which is use by 20,000 persons. each person will open his connection & when they not close the connection then there is a huge traffic in the ADO application which will eventually lead to damage to the whole system..
so it's a must to close the connections. if u want to close the connection u are required to close all existing recordsets also..

It's always adviced to close the connection whenever u are completed with the operation on the database ie right after the procedure call or command text call.. if u are not sure when then u can cooly write those statements at the end of the page..always whenever there is a error occurs have an error handler and check for the status of connections if they are open then close them in the error handling section.
_________________
Ambition Naver Comes to an End
anandham
Back to top
View user's profile Send private message Yahoo Messenger
steve1



Joined: 17 Feb 2005
Posts: 2

PostPosted: Fri Feb 18, 2005 1:21 pm    Post subject: Reply with quote

Thanks Anandham Smile

I'll close my ADO objects as soon as I'm done using them.




Thanks again,

Steve
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ASPdev.org Forum Index -> ASP programming All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2002 phpBB Group

SQL Tutorial