View previous topic :: View next topic |
Author |
Message |
steve1
Joined: 17 Feb 2005 Posts: 2
|
Posted: Thu Feb 17, 2005 9:57 am Post subject: Closing ADO resordset and database connection objects |
|
|
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 |
|
|
anandham
Joined: 18 Feb 2005 Posts: 1 Location: Mumbai
|
Posted: Fri Feb 18, 2005 8:36 am Post subject: U should close the connections & recordset |
|
|
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 |
|
|
steve1
Joined: 17 Feb 2005 Posts: 2
|
Posted: Fri Feb 18, 2005 1:21 pm Post subject: |
|
|
Thanks Anandham
I'll close my ADO objects as soon as I'm done using them.
Thanks again,
Steve |
|
Back to top |
|
|
|
|
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
|