PRB: Error in Data View Showing Text Based Data Source

Last reviewed: March 12, 1998
Article ID: Q180797
The information in this article applies to:
  • Microsoft OLE DB Provider for Jet, version 1.0
  • ActiveX Data Objects (ADO), versions 1.0, 1.5
  • Microsoft Visual InterDev, version 1.0

SYMPTOMS

When you use a Data View in Microsoft Visual Interdev you may receive this error:

   ODBC Error: S1000: [Microsoft] [ODBC Text Driver] The Microsoft jet
   database engine does not recognize 'TEXT.TXT.*' as a valid field name or
   expression.

CAUSE

The Microsoft ODBC text driver examines a designated folder for text files with extensions that were specified when the data source name (DSN) was created. Each text file, such as Text.txt is seen as a table. When Visual Interdev attempts to build a SQL query, it uses the filename as a table name and the period in the filename is an invalid character for a SQL table name.

RESOLUTION

Here are the steps to resolve the error:

  1. When you create the DSN, add the *.* extension to the list of extensions and save the text data source without an extension. Make sure that you do NOT select the 'Default(*.*)' check box because it will not show all files.

  2. In Visual Interdev, when you receive the error message, click OK. If the Query toolbar is not displayed right-click the toolbar client area and choose Query. Select the Show SQL Pane toolbar button and modify the SQL to a valid SQL statement.

STATUS

Microsoft is researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Create a tab delimited text file with the name Text.txt.

  2. In the ODBC Data Source Administator dialog box, select the System DSN tab and click ADD.

  3. Double click the Microsoft Text Driver.

  4. Enter a name and description for the data source.

  5. Clear the Use Current Directory check box and click the Select Directory command button to locate the folder with the text data source.

  6. Click the Options command button. In the Extension text field, enter *.* and click ADD.

    NOTE: Do not select the 'Default (*.*)' check box. A bug in this driver causes it not to display any files.

  7. Click Define Format and select the text data source from the Tables list box. Select Tab Delimited in the Format combo box.

  8. The Columns frame contains options to define the field names in the text data source.

Use this DSN in Microsoft Visual Interdev to view the data in 'Data View'.

Keywords          : oledbErrMsg
Technology        : ole
Version           : WINDOWS:1.0,1.5
Platform          : WINDOWS
Issue type        : kbprb


================================================================================


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