MDAC 2.5 SDK - OLE DB Programmer's Reference
Chapter 15: Transactions


 

Chapter 15: Transactions

In this chapter, simple transactions, nested transactions, distributed transactions, and transaction isolation are discussed.

A transaction enables a consumer to specify that a sequence of operations within a session must be performed as a single unit. Whether providers support transactions is provider-specific. If the provider supports transactions, a session object that supports ITransactionLocal can enter a simple (that is, non-nested) transaction.

A nested transaction occurs when a transaction is begun within the scope of another transaction. This inner transaction is represented by a transaction object. Providers that support nested transactions can choose to commit or abort a transaction at the outermost level or to commit or abort one of the inner transactions. ITransactionOutcomeEvents is implemented by the consumer to discover the outcome of transaction events.

For more information on Go to
Simple transactions "Simple Transactions" in this chapter
Transaction retention "Transaction Retention" in this chapter
Rowset preservation "Rowset Preservation" in this chapter
Nested transactions "Nested Transactions" in this chapter
Discovering the outcome of transaction events "Event Notifications" in this chapter
Methods to perform distributed transactions "Distributed Transactions" in this chapter
Transaction isolation levels "Isolation Levels" in this chapter
Locking resources to regulate sharing and isolation "Transaction Locks" in this chapter

The transaction object and transaction options object cotypes are defined as follows. For more information about cotypes, see "OLE DB Objects" in Chapter 1, "Overview of OLE DB."

CoType TTransaction {
   [mandatory]   interface IConnectionPointContainer;
   [mandatory]   interface ITransaction;
   [optional]    interface ISupportErrorInfo;
};

CoType TTransactionOptions {
   [mandatory]   interface ITransactionOptions;
   [optional]    interface ISupportErrorInfo;
};