Error Opening Access Database After Using It in Query

Last reviewed: September 12, 1996
Article ID: Q115394
The information in this article applies to:
  • Microsoft Query for Windows, version 1.0
  • Microsoft Access versions 1.0, 1.1, 2.0

SYMPTOMS

When you create a query or open an existing query in Microsoft Query, using a Microsoft Access data source, and you then open the database in Microsoft Access that you used in the query, one of the following error messages will appear (even if the query is closed, if Microsoft Query is still running):

   Microsoft Access version 2.0
   ----------------------------

   The database is opened by user '<username>' on machine '<machinename>'.
   You can't open this database exclusively.

   Microsoft Access versions 1.x
   -----------------------------

   Couldn't open file '<path><filename>'

CAUSE

You receive this error message if you open the database exclusively in Microsoft Access. Even though the query that used the Microsoft Access database is closed, a connection to the database still exists in Microsoft Query.

WORKAROUNDS

To avoid receiving this error message, when you open a database that has been used in query in Microsoft Query, do one of the following:

  • Close Microsoft Query

    -or-

  • In Microsoft Access, clear the Exclusive check box in the Open Database dialog box when you open the database.

    -or-

  • Edit the MSQUERY.INI file, located in your Microsoft Windows directory, by modifying the AutoDisconnect option in the [Microsoft Query] section to the following:

          AutoDisconnect=1
    

Note that this setting affects all data sources, not just Microsoft Access data sources.


KBCategory: kbinterop
KBSubcategory: xlquery xlwin

Additional reference words: 1.00 1.10 2.00 5.00 err msg



THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: September 12, 1996
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.