MSQuery ErrMsg: "Cannot Access Table..." If No Defined Database

Last reviewed: October 6, 1997
Article ID: Q115317
1.00 WINDOWS kbinterop

The information in this article applies to:

  • Microsoft Query, version 1.0
  • Microsoft Excel for Windows, version 5.0

SYMPTOMS

In Microsoft Query version 1.0, if you use the Microsoft Excel ODBC driver to access a worksheet that does not have a defined database, you will receive the following error message:

   Cannot Access Table c:\xldata.xls

where c:\xldata.xls is the name of the Microsoft Excel table being added.

You will receive the same error message if you try to view the table through the Table Definition option under the File Menu.

RESOLUTION

To avoid the error message, do the following to define a database range in Microsoft Excel:

  1. Open the file in Microsoft Excel 5.0.

  2. Select the field headings and all rows you want to be included in the database.

  3. From the Insert menu, choose Name, and then choose Define.

  4. Type in the name "MyDatabase" (without the quotation marks), and then choose OK.

  5. Resave and close the file (the worksheet must be saved in its original format, do not update the format to Microsoft Excel 5.0).

MORE INFORMATION

You can use the ODBC Microsoft Excel files driver to open and query Microsoft Excel version 3.0 and version 4.0 files. For more information on how Microsoft Query uses ODBC, query on the following words in the Microsoft Knowledge Base:

   Query ODBC Connectivity

The ODBC Driver for Microsoft Excel files did not ship with Microsoft Excel version 5.0 and Microsoft Query version 1.0.

To obtain ODBC Driver for Microsoft Excel, call the Microsoft Order Desk at (800) 360-7561 and request the ODBC Driver for Microsoft Excel. If you are outside the United States, contact the Microsoft subsidiary for your area. To locate your subsidiary, see the Microsoft World Wide Offices Web site at:

   http://www.microsoft.com/worldwide/default.htm


KBCategory: kbinterop
KBSubcategory: xlquery

Additional reference words: 5.00 1.00 err msg
Keywords : xlquery kbinterop
Version : 1.00
Platform : WINDOWS


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: October 6, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.