Reset ODBC with ASP page - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

Reset ODBC with ASP page

Hi all

A friend recommended that I join this forum to answer some questions rather than him.....

I have a very large Access database hosted in the States (It's expensive here in NZ) and every so often the database locks up. When I open the database folder there are two files, db.mdb and db.ldb. The ldb file is obviously the lock file.

The asp pages related to the database cannot access the database because of the lock file. I cannot delete the ldb file and have to get the webmaster to delete this file for me. He recommended that I use a script to "throw up an ODBC error" to unlock it. He also said that Cold Fusion has a utility that can do this so there should be something with ASP.

Does anyone know what he's talking about and could someone point me in the right direction?

Thanks
Jimmy

Comments

  • aaronjones3593aaronjones3593 Posts: 122Member
    : Hi all
    :
    : A friend recommended that I join this forum to answer some questions rather than him.....
    :
    : I have a very large Access database hosted in the States (It's expensive here in NZ) and every so often the database locks up. When I open the database folder there are two files, db.mdb and db.ldb. The ldb file is obviously the lock file.
    :
    : The asp pages related to the database cannot access the database because of the lock file. I cannot delete the ldb file and have to get the webmaster to delete this file for me. He recommended that I use a script to "throw up an ODBC error" to unlock it. He also said that Cold Fusion has a utility that can do this so there should be something with ASP.
    :
    : Does anyone know what he's talking about and could someone point me in the right direction?
    :
    : Thanks
    : Jimmy
    :

    Just remember to end all your database pages with the following:

    [code]
    <%
    objrs.Close
    Set objrs = Nothing
    objconn.close
    Set objconn = Nothing
    %>
    [/code]

    (Where objrs is the name of the variable holding your recordset [if any] and objconn is the name of the variable with the database connection instance.)

    (If you get any errors saying objrs doesn't exist, or you don't use a recordset of any type in that particular page, skip the first 2 lines of code but remember to still start it with the <% delimeter)

    For more info, look towards the end of the first section of code on this page:

    http://www.kamath.com/tutorials/tut001_access.asp


    -( Aaron )-

    "Pain does not hurt, if it's all you've ever felt."

Sign In or Register to comment.