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:
- Declare a unique host-language variable for each transaction name.
- Initialize each transaction variable to zero.
- Use
SET TRANSACTION
to start each transaction using an available transaction name. - Use the transaction names as parameters in subsequent transaction management and data manipulation statements that should be controlled by a specified transaction.