Configuring OLE DB Clients

Configuring OLE DB clients to connect to an instance of SQL Server requires making the server name and connection information available to the client (or OLE DB consumer) through an OLE DB provider. SQL Server connections through OLE DB are generally made using either:

  • The SQL Server Native Client OLE DB provider (progid SQLNCLI10).

  • The Microsoft OLE DB Provider for ODBC.

Connecting Clients Using SQLNCLI10

SQL Server Native Client (SQLNCLI10), the SQL Server-native OLE DB provider, exposes interfaces to consumers who want access to data on one or more instances of SQL Server. Using SQLNCLI10 allows you to develop an OLE DB consumer optimized for SQL Server databases. However, you can only use SQLNCLI10 with SQL Server, unlike the Microsoft OLE DB Provider for ODBC, which can access data from a number of OLE DB-compliant ODBC applications. You cannot use the information in an ODBC SQL Server data source name (DSN) to make a connection.

When setting up clients through the SQL Server Native Client OLE DB provider, the client should provide the necessary connection attributes, and either prompt for connection data or supply that data from an OLE DB data source saved in a persistent file.

Connecting Clients Using the OLE DB Provider for ODBC

Using the Microsoft OLE DB Provider for ODBC allows you to use a single OLE DB provider to connect to multiple ODBC data sources, including SQL Server. However, connecting to SQL Server clients with this provider entails more administrative overhead than using the native Microsoft OLE DB Provider for SQL Server.

For connections to an instance of SQL Server using the Microsoft OLE DB Provider for ODBC, the required information is usually created using ODBC Data Source Administrator and saved in a SQL Server ODBC DSN (either as a user, system, or file DSN). You can then code your application to use the SQL Server DSN to make a connection.

See Also

Other Resources