Udostępnij za pośrednictwem


Data Source Objects

In the Rowset Programming and Object Model, the data source programming task is represented by the data source object. The data source object represents a provider's underlying data store, such as a file or DBMS. Each OLE DB provider defines its own data source object class.

In this programming model, a consumer must first identify a data source object. The data source object specifies a provider and any authorizations and capabilities required to access the underlying data store. These specifications are unique to each data source object and are defined by its properties. After properties are set, the consumer initializes the data source object, which establishes the environment necessary to exchange data between the consumer and provider. After the data source object is initialized, the consumer can get self-descriptive information about the data store but cannot yet access data.

A data source object can be created in the following ways:

  • From a registry entry that identifies the provider

  • From an interface that uses a connection stringto specify the provider and property values

  • From an interface that presents a dialog to prompt a user for the provider and property values

For more information about creating instances of data source objects, see Data Source and Session Objects.