Specifying Lock Resolution

From InterBase

Go Up to Creating a Transaction Parameter Buffer


The lock resolution parameter describes what happens if a transaction encounters an access conflict during a write operation (update and delete operations on existing rows). There are two possible choices for this parameter:

  • isc_tpb_wait, the default, specifies that the transaction should wait until locked resources are released. Once the resources are released, the transaction retries its operation.
  • isc_tpb_nowait specifies that the transaction should return a lock conflict error without waiting for locks to be released.

For example, the following declaration creates a TPB with write access, a concurrency isolation mode, and a lock resolution of isc_tpb_nowait:

static char isc_tpb[] = {isc_tpb_version3,
isc_tpb_write,
isc_tpb_concurrency,
isc_tpb_nowait};

A TPB should specify only one lock resolution parameter. If more than one is specified, later declarations override earlier ones.

If a declared TPB omits the lock resolution parameter, InterBase interprets it as isc_tpb_concurrency.

Advance To: