Subject RE: [firebird-support] How to "lock" a record
Author Chad Z. Hower
:: Assuming you are displaying this is a grid or something
:: similarly Delphish, put the SELECT statement into a
:: read-only, ReadCommitted transaction

If I have a bunch of select statements - if I don't care about consistency
is it faster to put them all in a read transaction or just run them
separately? I assume if they are all in one the would create more read
locks.. So is it better just to let them run each in a separate transaction?

:: Put this statement in the thinnest possible update object
:: that runs in an explicitly controlled transaction in
:: configured with concurrency isolation and no wait lock
:: resolution (not autocommit!!). Read on...

Both of the above would bein one transaction. I need it long enough just to
get the PK and mark it as used. What is autocommit?

:: Pessimistic locking is available in Fb 1.5 through the the
:: SELECT...FOR UPDATE WITH LOCK syntax. It needs to be used
:: with great discretion on a very small set (preferably one
:: row) with a very short life and with a total understanding

This would be for one row - but I cannot rely on FB specific syntax.