ACC97: Errors Linking SQL Server 7.0 Table That Has Spaces in Table Name

ID: Q245685


The information in this article applies to:
  • Microsoft Access 97
  • Microsoft SQL Server version 7.0

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

  1. Create a new system DSN for the SQL Server database, and make sure the Use ANSI quoted identifiers check box is not selected.


  2. Make sure the connect strings of the tables have quoted=no.


  3. Install the latest service pack for SQL Server 7.0.


  4. 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:


  5. http://www.microsoft.com/data
  6. 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

Keywords : kberrmsg kbdta
Version : WINDOWS:97; winnt:7.0
Platform : WINDOWS winnt
Issue type : kbprb


Last Reviewed: December 23, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.