MDAC 2.5 SDK - OLE DB Providers
OLE DB Provider for Microsoft Jet


 

IDBDataSourceAdmin

This section describes Jet-specific implementation of the IDBDataSourceAdmin interfaces. This includes IDBDataSourceAdmin::CreateDataSource, IDBDataSourceAdmin::DestroyDataSource, IDBDataSourceAdmin::GetCreationProperties, and IDBDataSourceAdmin::ModifyDataSource.

IDBDataSourceAdmin is an interface for creating, destroying, and modifying data stores.

It is important to distinguish between the data source object and the data store. The data source object is the object used by the consumer code. The data store is the actual source of the data, such as a server database.

IDBDataSourceAdmin::CreateDataSource

Creates a new data store and data source object and initializes the data source object to the data store. For information about how this interface is implemented, see the OLE DB Programmer's Reference.

No data store creation properties are supported. For a complete description of the supported DBPROPSET_DBINIT and DBPROPSET_SESSION properties, see Appendix A: Properties.

Note   IDBDataSourceAdmin::CreateDataSource will create all new databases in an exclusive mode, regardless of what you set for DBPROP_INIT_MODE. If you want others to be able to open your newly created databases, you need to close the database and open it again using either the Initialize or CreateSession methods with the desired DBPROP_INIT_MODE setting.

IDBDataSourceAdmin::ModifyDataSource

This interface is used to change the database password.

To change the database password, a client should call ModifyDataSource with the DBPROP_JETOLEDB_DATABASEPASSWORD property set to the old password and DBPROP_JETOLEDB_NEWDATABASEPASSWORD set to the new password.