OLE DB Programmer's Reference

Session Objects

In the Rowset programming model, the session programming task is represented by the session object. The session object is a factory for command and rowset objects. Session objects can also act as factories for transaction objects, which are used to control nested transactions.

In this programming model, a session provides the following:

Note   It is provider-specific whether a single data source object is able to create multiple sessions. Simple providers, such as those built over a base table, index, file, or in-memory structure instead of a relational DBMS data store, usually do not support obtaining data with commands.

In OLE DB, a transaction is a set of operations on a data store that must be completed as a whole; if any part of the transaction fails, the entire transaction fails. Transactions can be created implicitly or explicitly, and may be nested. OLE DB factors support for transactions into a set of transaction interfaces that are created by the session object. For more information, see the section Transaction Management, in this chapter.

For more information about session objects, see Chapter 2: Data Source and Session Objects.