Microsoft KB Archive/245685

= Errors linking SQL Server 7.0 table that has spaces in table name =

Article ID: 245685

Article Last Modified on 1/25/2007

-

APPLIES TO


 * Microsoft Access 97 Standard Edition
 * Microsoft SQL Server 7.0 Standard Edition

-



This article was previously published under Q245685



Moderate: Requires basic macro, coding, and interoperability skills.



SYMPTOMS
When you link SQL Server 7.0 tables that have one or more spaces in the table names, you may receive the following error message:

ODBC call failed.

When you check the ODBC log, you see that the call to SQLPrepare failed. This problem can also occur when you use other software such as MSQuery.



RESOLUTION
To work around this behavior, use one of the following methods.

Method 1
 Create a new system DSN for the SQL Server database, and make sure the Use ANSI quoted identifiers check box is not selected. Make sure the connect strings of the tables have quoted=no. Install the latest service pack for SQL Server 7.0. Install the latest version of Microsoft Data Access Components (MDAC) on both the client and the server. You can download MDAC from the following Microsoft Web site:

http://msdn.microsoft.com/dataaccess

 Within SQL Server, run Instcat.sql from the latest version of MDAC on the server.

Method 2
Change any code and objects that use Data Access Objects (DAO) to use ODBCDirect instead.

Method 3
Remove the spaces from the names of the tables hosted by SQL Server.

Additional query words: prb gives get sql server 7 0

Keywords: kberrmsg kbprb KB245685

-

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

© Microsoft Corporation. All rights reserved.