View Full Version : Access Connection Close?

01-02-2004, 08:27 AM
I was wondering when useing access if the actual mdb file is open in access it creates a ldb file in the folder when you close access the ldb file disappears however when you connect to the ldb useing asp on the web it also creates the ldb file but when the browser is closed it doesnt dissappear I realize that is due to the browser doesnt tell the server to do so but how would you close the ldb file?:confused:

01-02-2004, 11:11 AM
You should always close the connection when you are finished with it.

If objCon was your db connection use:

Set objCon = Nothing

01-02-2004, 11:49 AM
I have that at the end of the page or do I need to put it after each time I open I have one after the </html>

01-03-2004, 01:11 AM
I usually set them as soon as possible.

Because if you woul redirect or have a response.end in your page, then the parser wount reach the end of your page ...

Or if you use a GetRows, then you can also immedetaly close the recordset and connection, and work on the recorsetdata that are then stored in the array

You should also always close your recordsets and free their resources, like:


rsRecordsetname = Nothing
Set objCon = Nothing