Subject Re: [ib-support] Transaction question
Author pschmidt@interlog.com
On 22 Nov 2002 at 14:03, Nico Callewaert wrote:

> Hi,
>
> I'm sure my question was already answered in this group, and I
> searched the archive before I've posted this, but there were too many
> articles related to this topic.
>
> My question is :
>
> User A opens a query and has 1 record displayed on his screen, the
> record stays let's say 1 hour on his screen. In the meantime user B
> opens the same record, changes it, posts the datset and commits the
> transaction. The data on the screen of user A remains unchanged,
> because there was no refresh done. Then user A changes the same
> record, posts the dataset and commits the transaction. I suppose the
> record that user B changed will be overwritten ? In case I'm right, is
> there a way of avoiding this ?

If this were the way it worked, C/S databases would have died out years ago.
Before a record is updated, the engine checks the last commit, if the last commit is
since the current read, you get an error from the database, the application should
trap the error, re-read the record and present the changed record to User A, who
can then redo their changes and re-save them. The exact error message should be
in the docs somewhere.