ASP/ADO/Cached Memory

by "Doug Dossett" <hwg(at)miscsites.com>

 Date:  Thu, 25 Apr 2002 08:26:11 -0700
 To:  hwg-techniques(at)hwg.org
  todo: View Thread, Original
Hello all:

Off and on, I've had problems with a web server going down completely or just some 
database connections that stop working.  In a couple instances, the host has said they 
just unloaded the cached memory for my site and that fixed the problem.  Therefore, 
I'm assuming that something in my code is eating up too much memory.  From 
previous instances and things they've said, I also suspect this may be a problem with 
objects not being released correctly.  Specifically database connection objects (I 
believe). 

So I want to just double check to be sure I'm doing this right.

I do the following:

sql = "select * from blah;"
Set Conn = Server.CreateObject("ADODB.Connection")
Conn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & 
Server.Mappath("..\..\..\databases\blah.mdb")
Set Rs = Conn.Execute( sql )

... various code with Rs("blah")'s ...

Set Rs = Nothing
Conn.Close
Set Conn = Nothing

So should this sufficiently kill everything I created?  Do I need to do a Rs.Close?  Any 
other pointers?

Thanks much,

Doug Dossett, LLC
MiscSites.com

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.