Share via


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:

  • A context for transactions

  • A default means of obtaining data from a data store if the provider does not support commands

  • A means to modify the properties of tables and indexes on the data store

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 Transaction Management.

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

This section contains the following topic: