Subject | Avoiding pessimistic locking |
---|---|
Author | yeohray |
Post date | 2005-10-06T13:50:26Z |
Searching through the archives, I see that pessimistic locking is not
necessary in Firebird in most cases. However, I still can't figure
out how to do the following:
user A edits record A
user B edits record A
user B post changes
user A post changes
How can I notify user A that record A has been changed? The only way
I know how is to keep B's transaction open, but that's obviously not
the right way. I think the solution has something to do with record
numbers i.e. when user A posts his changes, the record number is
compared with that in the database, and if not the same, an exception
is raised. Is this correct? FWIW, I'm using FibPlus in Delphi.
Thanks for any help.
Ray Mond
necessary in Firebird in most cases. However, I still can't figure
out how to do the following:
user A edits record A
user B edits record A
user B post changes
user A post changes
How can I notify user A that record A has been changed? The only way
I know how is to keep B's transaction open, but that's obviously not
the right way. I think the solution has something to do with record
numbers i.e. when user A posts his changes, the record number is
compared with that in the database, and if not the same, an exception
is raised. Is this correct? FWIW, I'm using FibPlus in Delphi.
Thanks for any help.
Ray Mond