Subject Re: [firebird-support] get_lock / release_lock
Author Kjell Rilbe
Doru Constantin wrote:

> It don't have to be without lock, but since in mysql it is so simple, I'm
> looking for similar to do things in firebird.

Understood, but if it is easiest to do it WITH record locks when
converting to Firebird, is there any reason not to?

The thing I can see is that if you want pessimistic locking, and editing
will have durations in the magnitude of hours, then it's probably not a
good idea to use record locks, simply because it's not a good idea to
keep transactions open for that long.

In that case, I suggest a separate lock table as per my earlier reply.
You would simply insert the name of the doc (or some other key). If the
insert fails, then someone already has the lock. If it succeeds, then
you've got the lock and can start editing. When you've saved the doc,
delete the lock. Just make sure you don't get stale locks, or provide a
cleanup feture, for example if a client crashes, loses its connection or

Kjell Rilbe
E-post: kjell@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64