Microsoft KB Archive/124500

= "Can't Access Table" Error If Table Name Contains Underscores =

Article ID: 124500

Article Last Modified on 8/15/2005

-

APPLIES TO


 * Microsoft Excel 95 Standard Edition
 * Microsoft Excel 5.0 Standard Edition
 * Microsoft Query 2000

-



This article was previously published under Q124500



SYMPTOMS
If you are using the SQL Server ODBC driver with Microsoft Query to view a table from an SQL Server database, you may receive the following error message

Can't access table 

where  is the table you are trying to view.



CAUSE
Your ability to access a table from Microsoft Query is affected by the number of underscores and the length of the SQL Server table name.



STATUS
Microsoft has confirmed this to be a problem in versions 1.0 and 2.0 of the Microsoft SQL Server ODBC drivers for Windows and Macintosh.

The problem is corrected in the 32-Bit SQL Server ODBC driver (version 2.50.0121) that is included with the ODBC 3.0 Desktop Driver pack.



MORE INFORMATION
Microsoft Query allows you to create table names up to 30 characters long; however, although Query will allow you to create a table that has underscores in the table name, you may not be able to view it later. You may not be able to view the table, because the SQL Server ODBC driver has a problem accessing tables in which the table name length exceeds a certain number of characters and the name also contains a certain number of underscores. The following table illustrates the limitations imposed when you access an SQL Server table in Microsoft Query.

For example, if you try to view a table for which the name has a total of 25 characters, including 4 underscores, then you will receive the above error message.

NOTE: The last entry in the table shows that if there are 11 underscores in the table name and the table name is greater than 10 characters long, you will not be able to view the table after creating it. If the table has 11 underscores, the name cannot be less than 11 characters. Therefore, you cannot have a table with more than 10 underscores in the name.

Additional query words: 5.00a 5.00c MSQuery

Keywords: KB124500

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.