Subject Re: [Firebird-Java] Reserving multiple tables
Author dhay@lexmark.com
Hi,

I guess in this case I can do

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

right?

But is it possible to do the equivalent of:

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_shared, isc_tpb_lock_write, "EMPLOYEE"};

ie with different isc_tpb_protected / isc_tpb_shared? Or doesn't that even
make sense?

btw, I don't need this at the moment - just interested!

cheers,

David
x54680


|---------+----------------------------->
| | dhay@... |
| | Sent by: |
| | Firebird-Java@yaho|
| | ogroups.com |
| | |
| | |
| | 01/31/2006 11:08 |
| | AM |
| | Please respond to |
| | Firebird-Java |
| | |
|---------+----------------------------->
>------------------------------------------------------------------------------------------------------------------------------|
| |
| To: Firebird-Java@yahoogroups.com |
| cc: |
| Subject: [Firebird-Java] Reserving multiple tables |
>------------------------------------------------------------------------------------------------------------------------------|




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




Yahoo! Groups Links