A transaction enables consumers to define units of work within a provider, and when data is shared, defines the relationship of those units to each other. This chapter discusses the relationship of a session to a simple transaction; the behaviors for transaction retention and rowset preservation; and nested transactions. A nested transaction occurs when a database-transaction object (the parent transaction) sets up a transaction. Providers that support extended transaction functionality are able to commit or abort a transaction at different levels. ITransactionOutcomeEvents is an interface implemented by the consumer in order to discover the outcome of transaction events. Methods to perform coordinated transactions, if supported by the provider, are given, and transaction isolation levels are defined. Locking resources to regulate sharing and isolation are also discussed.
For more information on | Go to |
Consumers and providers | "Consumers and Providers" in Chapter 1, "Overview of OLE DB" |
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 |
Extended transaction functionality | "Transaction Objects" in this chapter |
Commit or abort a transaction at different levels | "Committing or Aborting a Transaction Object" in this chapter |
Discover the outcome of transaction events | "Notification Events" in this chapter |
Methods to perform coordinated transactions | "Coordinated Transactions" in this chapter |
Transaction isolation levels | "Isolation Levels" in this chapter |
Locking resources to regulate sharing and isolation | "Locking" in this chapter |
Transactions are mechanisms used to define persistent units of work within an application, and to define how the different units relate to each other in a system with parallel activities.
Transactions:
CoType TTransaction {
[mandatory] interface IConnectionPointContainer;
[mandatory] interface ITransaction;
[optional] interface ISupportErrorInfo;
};
Transaction Options:
CoType TTransactionOptions {
[mandatory] interface ITransactionOptions;
[optional] interface ISupportErrorInfo;
};