...

View Full Version : Access Connection Close?



Crash1hd
01-02-2004, 09: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:

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

If objCon was your db connection use:

objCon.Close
Set objCon = Nothing

Crash1hd
01-02-2004, 12:49 PM
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>

raf
01-03-2004, 02: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.Close
objCon.Close

rsRecordsetname = Nothing
Set objCon = Nothing



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum