Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Regular Coder
    Join Date
    Jul 2002
    Location
    51° 03' -78" N -114° 05' 72" W
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Access Connection Close?

    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?

  • #2
    New Coder
    Join Date
    Nov 2003
    Posts
    65
    Thanks
    1
    Thanked 0 Times in 0 Posts
    You should always close the connection when you are finished with it.

    If objCon was your db connection use:

    objCon.Close
    Set objCon = Nothing

  • #3
    Regular Coder
    Join Date
    Jul 2002
    Location
    51° 03' -78" N -114° 05' 72" W
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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>

  • #4
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •