ACC97: ODBC Error Using IDC Files to Query SQL Server TablesLast reviewed: May 20, 1997Article ID: Q161015 |
The information in this article applies to:
SYMPTOMSAdvanced: Requires expert coding, interoperability, and multiuser skills. When you use IDC files to query a table in a Microsoft Access 2.0, 7.0, or 97 database that is linked to Microsoft SQL Server, you may receive the following error message if the SQL Server password is not saved with the linked table when you create it:
ODBC -- connection to '<Server Name>' failed.This happens even if you specify a username and password in the IDC file.
CAUSEThe IDC file uses a System DSN to communicate with the Microsoft Access database that contains the linked tables. The username and password in the IDC file are used to log on to the Microsoft Access database. The Microsoft Access database cannot use the same username and password to log on to Microsoft SQL Server.
RESOLUTIONThere are two methods to work around this behavior.
Method 1Create a System DSN to query the Microsoft SQL Server database directly instead of using the Microsoft Access database with linked tables. Rewrite your IDC file so it uses the new System DSN. Then the username and password in your IDC file are used to log on to SQL Server.
Method 2Save the password with the linked table when you create it in the Microsoft Access database. The following example shows you how to save a password with a linked SQL Server table. This example assumes that you have a valid System DSN on your computer that points to the sample Pubs database on a Microsoft SQL Server.
MORE INFORMATIONUse the work around described in Method 1 of the "Resolution" section when the error message occurs under the following circumstances:
REFERENCESFor more information about linking tables to ODBC data sources, search the Help Index for "ODBC, importing and linking data," or ask the Microsoft Access 97 Office Assistant.
|
Additional query words: internet intranet IIS
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |