Subject Re: [ib-support] Locking table
Author Christian G├╝tter
Hi Baro,

> is possible to lock a table?

you did not tell which db version you use.
In Firebird 1.0x and Interbase 6.0x, you can only perform
dummy updates to lock rows.
In Firebird 1.5, you have the opportunity to lock rows
using 'SELECT FOR UPDATE [WITH LOCK]'.
But locking a table using these techniques would IMHO have
some unwanted side-effects.
AFAIK there is no command to lock a whole table. The only
thing you can do to achieve this is to open the database
in exclusive mode. But I can't tell you how this can be
accomplished using Java.

Anyway, because IB/FB uses optimistic locking, row locking
is something one hardly ever uses.

If you come from a 'flat file DB" background (Paradox or
whatever), take a look at the information gathered on
websites like www.ibphoenix.com and look for explanations
of optimistic locking, MGA and try to download the
Interbase 6 beta documentation.

If you are not an IB/FB newbie, just ignore the last
paragraph ;-)


Cheers,
Christian