Subject Reserving multiple tables
Author dhay@lexmark.com
Hi Roman,

I need to specify a write lock on multiple tables, and can't find the the
correct syntax documented for Jaybird.

In the IB docs, it has the following:

static char isc_tpb[] = {isc_tpb_version3,
isc_tpb_write,
isc_tpb_concurrency,
isc_tpb_nowait,
isc_tpb_protected, isc_tpb_lock_read, "COUNTRY",
isc_tpb_protected, isc_tpb_lock_write, "EMPLOYEE"};

to lock 2 tables, one for read, one for write.

But I need to effectively do the following:

static char isc_tpb[] = {isc_tpb_version3,
isc_tpb_write,
isc_tpb_concurrency,
isc_tpb_nowait,
isc_tpb_protected, isc_tpb_lock_write, "COUNTRY",
isc_tpb_protected, isc_tpb_lock_write, "EMPLOYEE"};

How does this translate into creating the appropriate TPB?

Do I do:

tpb.addArgument(TransactionParameterBuffer.PROTECTED);
tpb.addArgument(TransactionParameterBuffer.LOCK_WRITE, "COUNTRY");
tpb.addArgument(TransactionParameterBuffer.PROTECTED);
tpb.addArgument(TransactionParameterBuffer.LOCK_WRITE,
"EMPLOYEE");

or:

tpb.addArgument(TransactionParameterBuffer.PROTECTED);
tpb.addArgument(TransactionParameterBuffer.LOCK_WRITE, "COUNTRY,
EMPLOYEE");

It's hard to see with the former how they connect, so I'm guessing the
latter?!!

cheers,

David