Subject Re: How to detect a record changed between read and update?
Author constantijnw
Hi Ivan,

--- In firebird-support@yahoogroups.com, "Ivan Prenosil"
<Ivan.Prenosil@s...> wrote:
> There are many different ways.

The best will do, thank you.

> The easiest is to use snapshot transaction (which is default).
> Since snapshot provides consistent view of whole database,
> it can't see changes that happened after its start,
> thus in this transaction you can't update such records.
>
> Ivan

You mean I shouldn't do this? You can't start a transaction in a sp,
right?


>
>
>
> ----- Original Message -----
> From: "Constantijn Wolfs cw.s" <cw.s@x...>
> To: <firebird-support@yahoogroups.com>
> Sent: Thursday, June 17, 2004 3:46 PM
> Subject: [firebird-support] How to detect a record changed between
read and update?
>
>
> > Hello,
> >
> > I want to raise an exception when a record changed between the
original
> > read and the update with a sp.
> >
> > I could do a select on the old values and proceed with the update
when
> > the record was found. But is there a better way to do this, making
the
> > change of overwriting other updates as small as possible, without
locking?
> >
> > Constantijn