MDAC 2.5 SDK - OLE DB Providers
OLE DB Provider for ODBC


 

Obtaining Data Source Objects

The ODBC Provider supports creating an initialized data source object through a file moniker. To do this, follow these steps:

  1. Create a file moniker (.dsn file). A .dsn file contains connection information.

  2. Bind to this file moniker, asking for IID_IDBInitialize. This returns an uninitialized data source object.

A data source object can also be obtained through CoCreateInstance using the CLSID MSDASQL.