Subject Re: Best way to prevent simultaneous editing?
Author Svein Erling Tysvær
--- In firebird-support@yahoogroups.com, "Sudheer Palaparambil" wrote:
> Hi,
>
> If a person is editing a particular invoice, I don't want
> anybody else to edit or view that particular invoice (thru
> my application).
>
> Which way is the best to prevent this? Can I use a flag in
> the invoice master table and handle the situation or do a
> dummy update to invoice master and lock it?
>
> Thank in advance.
>
> Sudheer Palaprambil

Firebird generally uses optimistic locking, but by making your program
try a dummy update before going into "edit mode", you can simulate
pessimistic locking.

Though I am a bit surprised that you don't even want anyone to be able
to view your invoice when an update is taking place.

Set