MDAC 2.5 SDK - OLE DB Programmer's Reference
OLE DB Core Components Interfaces
Use the IDataInitialize interface to create a data source object using a connection string. You can also retrieve a connection string from an existing data source object.
To build a connection string, use the prompting user interface available through the IDBPromptInitialize interface and then use IDataInitialize to get a data source object based on that connection string.
For more information, see "Creating Data Source Objects" in Chapter 2, "Data Source and Session Objects."
Call IDataInitialize to provide a common entry point for consumers to obtain a data source object or to get persistent data source information.
Method | Description |
IDataInitialize::CreateDBInstance | Creates a data source object. Analogous to CoCreateInstance. |
IDataInitialize::CreateDBInstanceEx | Creates a data source object. Analogous to CoCreateInstanceEx. |
IDataInitialize::GetDataSource | Given a connection string, instantiates and returns a data source object. |
IDataInitialize::GetInitializationString | Given a data source object, returns a connection string. |
IDataInitialize::LoadStringFromStorage | Loads a connection string from storage. |
IDataInitialize::WriteStringToStorage | Writes a connection string to storage. |