Microsoft JET Database Engine error '80004005' Could not use ''; filealready in use.

Discussion in 'ASP General' started by Mel, Dec 16, 2007.

  1. Mel

    Mel Guest

    I get this error when accessing a MS access 2003 database from an ASP
    page when the database is opened in Access on the backend. When the
    database is not open on the backend it works fine!

    -------------
    Microsoft JET Database Engine error '80004005'
    Could not use ''; file already in use.
    -------------

    How can I run the asp pages and have (anybody) open Access on the
    backend at the same time?

    The ASP page connects to the database as follows:

    <%
    Dim MM_hostingDB_STRING
    MM_hostingDB_STRING = "Provider=Microsoft.Jet.OLEDB.4.0;Data
    Source=""D:\hosting.mdb"""

    Dim RecordsetCustomers
    Set RecordsetCustomers = Server.CreateObject("ADODB.Recordset")
    RecordsetCustomers.ActiveConnection = MM_hostingDB_STRING
    RecordsetCustomers.Source = "SELECT * FROM q_customers order by
    customer"
    RecordsetCustomers.CursorType = 0
    RecordsetCustomers.CursorLocation = 2
    RecordsetCustomers.LockType = 1
    RecordsetCustomers.Open()
    %>

    Regards

    Mel Christie
     
    Mel, Dec 16, 2007
    #1
    1. Advertisements

  2. All users of the database file need to be able to create, modify and
    delete a locking file that has a .ldb extension in the folder that
    contains the database file. This means that users need Change/Modify
    permissions for the folder, not just the .mdb file. Who the users are
    depends on what type of authentication your website is using. If using
    Anonymous, then the IUSR_machinename account requires permission for the
    folder. Otherwise, all the accounts of the users themselves need the
    permissions. See:
    http://support.microsoft.com/default.aspx/kb/253604
    http://support.microsoft.com/default.aspx/kb/166029
    http://support.microsoft.com/kb/253580/EN-US/


    Once the permissions are correct, you will be able to have the database
    open in Access while running web pages that also use it.
     
    Bob Barrows [MVP], Dec 16, 2007
    #2
    1. Advertisements

  3. Mel

    Mel Guest

    That fixed everything thanks!

    Mel
     
    Mel, Dec 16, 2007
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.