Simple Transactions

If the provider supports transactions, the session supports ITransactionLocal, which inherits from ITransaction. Calling ITransactionLocal::StartTransaction begins a transaction on the session.

A session may be inside or outside a transaction at any point in time. When created, a session is outside a transaction, and all work done within the scope of that session is immediately committed on each method call. When a session enters a local or coordinated transaction, all work done by the session, or the commands and rowsets associated with that session, are part of that transaction.

Multiple sessions can be associated with a single data source object. Each of these sessions may be inside or outside a transaction at any point in time, and each session that is in a transaction defines the scope of objects affected by that transaction.