Obtaining Data Source Objects
The ODBC Provider supports creating an initialized data source object through a file moniker:
-
Create a file moniker (.dsn file). A .dsn file contains connection information.
-
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.