ACC2000: "Error '80004005'" Error Message When You Try to Open a Data Access Page If the Database Is Open in Access (319319)



The information in this article applies to:

  • Microsoft Access 2000

This article was previously published under Q319319
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies only to a Microsoft Access database (.mdb).

SYMPTOMS

When you try to open a data access page that is based on an Access database, you may receive an error message similar to the following:
Microsoft OLE DB Provider for ODBC Drivers error '80004005' [Microsoft][ODBC Microsoft Access 97 Driver] Couldn't use '(unknown)'; file already in use.

CAUSE

This behavior occurs when you try to open a data access page if both of the following conditions are true:
  • The database (.mdb file) is located in the same Microsoft Internet Information Services (IIS) virtual folder as the data access page.

    -and-
  • The database is currently open in Access.

RESOLUTION

To resolve this issue, follow these steps.

NOTE: This method resolves this issue only if the database is opened non-exclusively. If the database is opened exclusively, this issue cannot be avoided.
  1. Move the .mdb file to a folder that is not a subfolder of InetPub\wwwroot.
  2. Grant the necessary access rights to the folder where the database is located. If the Web site uses Anonymous Authentication, typically you only have to grant access permissions to IUSR_ComputerName.
  3. Modify the ActiveX Data Objects (ADO) connection string in the Active Server Pages (ASP) page to point to the new location of the Access database. To do so, follow these steps:
    1. Open the page in Design view
    2. On the View menu, click Field List.
    3. Right-click the Database tool at the top of the list, and then click Connection on the shortcut menu.
    4. Click the Connection tab, and then in the Select or enter a database name box, type the new path to the database.

      NOTE: Microsoft recommends that you use the Jet 4.0 OLE DB Provider instead of the Access ODBC driver to establish an ADO connection. To select the Jet 4.0 OLE DB Provider, click the Provider tab.
    5. Click Test Connection to confirm that the path is correct.
    6. Click OK to close the Data Link Properties dialog box.

REFERENCES

For additional information about a similar issue that results in the error message listed in the "Symptoms" section of this article but that occurs consistently and not only if the database is open in Access, click the article number below to view the article in the Microsoft Knowledge Base:

174943 PRB: 80004005 "Couldn't Use '(unknown)'; File Already in Use"


Modification Type:MinorLast Reviewed:1/7/2006
Keywords:kberrmsg kbprb KB319319