Go Up to Requirements for all Applications
All applications must provide one transaction handle for each transaction to be accessed. A transaction handle is a long pointer that is used in API functions to start a transaction and to reference it in subsequent API calls. The InterBase header file,
ibase.h, contains a
#define useful for declaring transaction handles.
When starting a transaction, optional transaction characteristics, such as access method and isolation level, can be passed to the start-up call through a transaction parameter buffer (TPB). Usually, one TPB is set up for each transaction, although transactions with the same operating characteristics can also share a TPB.
Transaction Handle Declaration Requirements
A transaction handle must be declared and initialized to zero before use. The following code illustrates how to declare and initialize a transaction handle:
#include <ibase.h> . . . /* Declare a transaction handle. */ isc_tr_handle tr1; . . . /* Initialize the handle. */ tr1 = 0L;
For more information about declaring, initializing, and using transaction handles, see Working with Transactions.
Setting up a TPB
A TPB is a byte array containing parameters that describe optional transaction characteristics. In these cases, the TPB must be set up and populated before starting a transaction. Parameters that can be passed to the TPB are defined in
For more information about setting up, populating, and using a TPB, see Working with Transactions.