home Tech Library Tech Forum
Publisher
 
Data Access Mechanisms in C++      
 
OLE DB Overview  

OLE DB is a set of COM interfaces which implements the uniform access to data using the Universal Data Access mechanism. The OLE DB architecture uses the model of consumers and providers. A consumer makes the requests and the provider responds to these requests by placing data in a tabular format.
A consumer is any system or application code (not necessarily an OLE DB component) that accesses data through OLE DB interfaces. The interfaces are implemented by the provider and thus, a provider is a component that implements OLE DB interfaces and expose it to other objects.
The OLE DB Object Model comprises of a number objects or components, which in sync works to achieve the basic functionalities of OLE DB mechanism.

The OLE DB objects can be listed as
   1. Data Source
        It creates and manages the connection and contains permissions and authentications
        information

   2. Sessions
        A session manages a particular instance of interaction with the data source to query
        and retrieve data.

   3. Commands
        A command is a container for a text command, which is passed from a consumer to
        a data source object for execution by the provider's underlying data store

   4. Rowsets
        Rowset is used to expose data in a tabular format.

   5. Accessors
        An accessor is used to describe how the data will be stored in the consumer, like the
        binding between the rowset fields and the data members in the consumer.

   6. Transactions
        Transaction objects are used to bundle a set of indivisible work unit.

   7. Enumerators
        It search and stores the list of available data sources and other enumerators.

   8. Errors
       Error objects contain additional information on error.

   9. Notifications
       Notification objects enable cooperating consumers sharing the rowset to be informed
       about actions on the rowset performed by their peers.

For implementation of OLE DB supported applications, we can use the ATL OLE DB Templates, MFC OLE DB Classes or the OLE DB SDK interfaces itself. The OLE DB templates are C++ templates, providing classes that implement many commonly used OLE DB interfaces and the template library is categorized into consumer templates and provider templates.
 
         
       RELATED TOPICS    
Data Access Programming
Data Bound Controls (ADO and RDO)
Universal Data Access
           
Home | Profile | Users | Library | Publisher | Tech Forum | News | Contact Us