ADO and OLE DB Provider Installation

ADO and SQL Server

ADO and SQL Server

ADO and OLE DB Provider Installation

ADO clients that communicate with OLE DB need an OLE DB provider, a dynamic-link library that uses OLE DB interfaces and methods to query an SQL data source. For Microsoft® SQL Server™ 2000, the following types of OLE DB providers can be used:

  • Microsoft OLE DB Provider for SQL Server (SQLOLEDB), which maps OLE DB interfaces and methods over SQL Server data sources.

  • Microsoft OLE DB Provider for ODBC (MSDASQL), which maps OLE DB interfaces and methods to ODBC APIs. OLE DB consumers connect to an instance of SQL Server using the SQL Server ODBC driver as an intermediary layer.

SQLOLEDB is installed with SQL Server 2000 and is recommended when developing new applications. MSDASQL is provided for backward compatibility only.

The ADO Connection and Error Handling sample application, used in some of the code examples in ADO topics, uses SQLOLEDB. Where pertinent, MSDASQL examples are also provided.

SQLOLEDB does not support the use of an ODBC DSN connection, but it does support the use of Microsoft Data Links. For more information about the use of connection properties for SQLOLEDB and MSDASQL, see Connecting to a SQL Server Data Source.

If you are running ADO code with SQL Server 2000 and an unexpected error occurs, check the provider properties. The error could be attributable to the way ADO interacts with different OLE DB providers.