다음을 통해 공유


Data Source Objects (OLE DB)

In OLE DB, a data source object is a COM object through which a consumer connects to a provider's underlying data store.

It is important to distinguish a provider's data source object, which provides data from the data store to a consumer, from the data store itself, which contains the data but interacts with the consumer only through the data source object. For example, a data store might be a comma-separated-value (CSV) text file, an SQL DBMS, or an in-memory array in an application.

The data source object cotype is defined as follows. For more information about cotypes, see Conceptual Programming Models in OLE DB.

CoType TDataSource {
   [mandatory]   interface IDBCreateSession;
   [mandatory]   interface IDBInitialize;
   [mandatory]   interface IDBProperties;
   [mandatory]   interface IPersist;
   [optional]    interface IConnectionPointContainer;
   [optional]    interface IDBAsynchStatus;
   [optional]    interface IDBDataSourceAdmin;
   [optional]    interface IDBInfo;
   [optional]    interface IObjectAccessControl;
   [optional]    interface IPersistFile;
   [optional]    interface ISecurityInfo;
   [optional]    interface ISupportErrorInfo;
   [optional]    interface ITrusteeAdmin;
   [optional]    interface ITrusteeGroupAdmin;
}

For information about the registry entries used by providers to register classes of data source objects, see Provider Registry Entries.

This section contains the following topics: