Working with Multiple Transactions

From InterBase

Go Up to Working with Transactions


Because InterBase provides support for transaction names, a program can use as many transactions at once as necessary to carry out its work. Each simultaneous transaction in a program requires its own name. A transaction name distinguishes it from other active transactions. The name can also be used in data manipulation and transaction management statements to specify which transaction controls the statement. For more information about declaring and using transaction names, see Starting a Named Transaction.

There are four steps for using named transactions in a program:

  1. Declare a unique host-language variable for each transaction name.
  2. Initialize each transaction variable to zero.
  3. Use SET TRANSACTION to start each transaction using an available transaction name.
  4. Use the transaction names as parameters in subsequent transaction management and data manipulation statements that should be controlled by a specified transaction.

Topics

Advance To: