XL98: Problems Adding Text Table in Microsoft Query

ID: Q179660


The information in this article applies to:
  • Microsoft Excel 98 Macintosh Edition


SYMPTOMS

When you try to query a table in Microsoft Query by using the Text ODBC driver, one of the following problems occurs.

Error Adding Table

When you try to add the table to Microsoft Query, the following error appears:

Can't access table <database>

where <database> is the name of the file you are attempting to open in Microsoft Query.

Cannot See Text File

When you attempt to create a new data source name (File DSN), some or all of the text files do not appear in the "Select a default table for your data source (optional)" box in the "Create New Data Source" dialog box.


CAUSE

Error Adding Table

This problem occurs when either of the following cases is true:

Case 1:
  • You create a File DSN without first creating a User DSN that defines each of the text files.


  • -and-

  • In the Add Tables dialog box, you try to add one of the text files that was not defined in the User DSN.


Case 2:
  • You create a User DSN for a text file and the file contains a file name extension, such as .txt.


  • -and-

  • In the Add Tables dialog box, you try to add one of these text files.


Cannot See Text File

This problem occurs if you have not defined that text file by creating a User DSN.


WORKAROUND

To work around this problem, use the one of following methods, depending on your situation.

Method 1: Error Adding Table

To use this method, follow these steps:
  1. Create a User DSN by using the Text ODBC driver and define each table that you want to use.

    1. To define a table, click the Define tab and select your file in the list.


    2. If the column names do not appear in the Column Information list, click Guess, and then click OK.


    If you are using several text files, you must define each by repeating steps a and b.


  2. If your text file contains a file name extension (such as .txt), configure the DSN following these steps:

    1. When you define the User DSN, click the option "Use DOS File Extensions" in the Mac File Types dialog box.


    2. After you create the User DSN for the Text ODBC driver, create a File DSN for the specific text file.


    3. To add a table to your query, you should use the Query Wizard. If you do not use this wizard, the "Cannot Access" error message may appear when you attempt to add a text file in the Add Tables dialog box.




Method 2: Cannot See Text File

If the text file does not appear in the list, first define the table. To define the table when you create the User DSN, follow these steps:
  1. To define a table, in the Microsoft 3.01 Text PPC dialog box, click the Define tab, and select the file in the list.


  2. If the column names do not appear in the Column Information list, click Guess, and then click OK.



STATUS

Microsoft has confirmed this to be a problem in the products listed above. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

Additional query words: XL98

Keywords : kbtool xlquery
Version : MACINTOSH:98
Platform : MACINTOSH
Issue type : kbbug


Last Reviewed: January 13, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.