Subject Re: [IBO] Pessimistic Lock
Author Geoff Worboys
> Any other alternatives ? .

Take a look at the tech info sheet called "DML Caching" available from
the IBO website:

> I am not sure to use it. But it seems to solve my problem. Let me
> explain it . I have a dataset for updating totals of some
> calculations. Say A and B fields have values A:=500 and B:=1000 .

Your description of a conflicting update is just the standard - two
users updating the same record - problem. If there is some particular
record (or small set of records) that are likely to be edited my
multiple users at the same time then perhaps pessimistic locking is
appropriate. This tends to be fairly rare in most applications which
is why pessimistic locking is not always used.

If you do use pessimistic locking make sure you understand that a
pessimistic lock is simply a dummy update against the row - there is
nothing otherwise special and the process. This means that your
various triggers will be fired etc.

My main concern is your statement "dataset for updating totals", I
hope this does not mean you are using triggers to maintain total
records in some other table. This is not generally recommended and
needs to be done very carefully to be safe in a multi-user

Geoff Worboys
Telesis Computing