The information in this article applies to:
SYMPTOMSThe SQLOLEDB provider returns the following error message when accessing a SQL Server 6.0 in a SQL Server 7.0 distributed query:
CAUSE
The SQLOLEDB provider was not designed to work with SQL Server version 6.0, and therefore distributed queries do not work through this provider. SQL Server Requirements: To use SQLOLEDB to access data in SQL Server databases, you must have SQL Server version 6.5 or later. RESOLUTIONTo work around the error you first must run the updated Instacat.sql script on the SQL Server 6.0 machine. The updated Instacat.sql script ships with SQL Server 7.0. After applying the script, instead of using the SQLOLEDB provider, you can use the OLEDB provider for ODBC with the SQL Server ODBC driver to query SQL Server 6.0. STATUSThis is by design. MORE INFORMATIONMicrosoft SQL Server version 7.0 provides the ability to perform queries against OLE DB providers. This is done by using the OpenQuery or OpenRowset Transact-SQL functions or by using a query with four-part names including a linked-server name. For example:
To reproduce the errors, run the following code sample, where "SQL60Servername" represents the name of your SQL 6.0 server:
This will give the following error:
NOTE: The same error message occurs before and after applying the Instcat.sql file, which ships with SQL 7.0, to the SQL 6.0 machine. The following block of code shows how to use the OLEDB provider for ODBC to add the SQL Server 6.0 as a distributed query:
If you have not applied the SQL 7.0 Instcat.sql file to SQL 6.0 server, the above query will return the following error:
REFERENCESFor more details on setting up and using Distributed Queries, search on the following sp_addlinkedserver, OpenQuery, OpenRowset and related topics in SQL 7.0 Books Online. Additional query words: kbDSupport
Keywords : kbDatabase kbOLEDB kbSQLServ kbVC kbSQLServ600 kbSQLServ700 |
Last Reviewed: March 20, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |