ASP Database Fundamentals (Part 1) - Closing The Connection
(Page 5 of 6 )
When you are finished with the reference to the database connection object, it is important to correctly close and destroy it. Not doing so can potentially cause issues on your web server, due to memory resources that have been allocated but not properly released.
Follows is an acceptable method for closing and destroying a ADO connection object:
<%
Conn.close
Set conn = nothing
%>
As you can see, the first thing we did was close the actual connection to the database. Next, we set the object to a value of "nothing", which destroys the actual object reference and releases the memory back to the operating system.
Next: What's Next? >>
More ASP Articles
More By Rich Smith