Microsoft KB Archive/319319

= ACC2000: &quot;Error '80004005'&quot; Error Message When You Try to Open a Data Access Page If the Database Is Open in Access =

Article ID: 319319

Article Last Modified on 1/7/2006

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



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.  Move the .mdb file to a folder that is not a subfolder of InetPub\wwwroot. 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_ . 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:  Open the page in Design view On the View menu, click Field List. Right-click the Database tool at the top of the list, and then click Connection on the shortcut menu.</li> 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.</li> Click Test Connection to confirm that the path is correct.</li> Click OK to close the Data Link Properties dialog box.</li></ol> </li></ol>

<div class="references_section">