Invoking the Oracle Provider

The OLE DB Provider for Oracle (Msdaora.dll) can be invoked using a variety of methods, depending on your programming needs. Calling CoCreateInstance on IDBInitialize is traditionally used in OLE DB to open a data source object. However, to use resource pooling, you call CoCreateInstance on either IDataInitialize or IDBPromptInitialize. Both interfaces are part of the OLE DB service components and not your OLE DB data provider. Using IDataInitialize and IDBPromptInitialize to retrieve an instance of IDBInitialize from the OLE DB Provider for Oracle enables the service components, which include pooling, transaction enlistment, and the Client Cursor Engine. These methods are illustrated in Appendix F: Sample OLE DB Consumer Application in the OLE DB Programmer's Reference.

Connecting from ADO

The OLE DB Provider for Oracle is invoked from ADO using a typical connection string, such as the following:

"Provider=MSDAORA;Data Source=serverName;User ID=userName; Password=userPassword;"

When called from ADO, the OLE DB services are automatically enabled but the Client Cursor Engine service is not. For more information about these services, see "OLE DB Services" in the OLE DB Programmer's Reference. For more information on connection strings and keywords, see the ADO Programmer's Reference.