MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 1: Overview of OLE DB


 

Data Source Objects, Session Objects, and Transaction Objects

In OLE DB, a data source object (DSO) is a COM object through which a consumer connects to a provider's underlying data store, such as a file or a DBMS. Each OLE DB provider defines its own data source object class. To connect to the provider, a consumer must create and initialize an instance of this class. For more information about creating instances of data source objects, see Chapter 2, "Data Source and Session Objects." Data source objects are factories for session objects.

Session objects provide a context for transactions and can be implicitly or explicitly transacted. A single data source object may be able to create multiple sessions. (This is provider-specific.) Session objects are a factory for command and rowset objects, which provide methods for creating command objects and rowsets and for creating and modifying tables and indexes. Session objects can also act as factories for transaction objects, which are used to control nested transactions.

Transaction objects are used when committing or aborting nested transactions at any level other than the lowest level.