Subject | Re: [ib-support] wait transactions and rollback |
---|---|
Author | Woody |
Post date | 2002-06-25T14:36:50Z |
From: "Danny Garcia Hernandez" <danny@...>
his/her changes, then the second user will still get an error, it just waits
until the commit to do so. If the first user rolls back their changes, then
the second one will go through since nothing really changed.
and you can handle it in a loop that keeps trying until it succeeds. In most
cases, this will be a very short time period if it happens at all. You could
even put a counter in the loop that let's the user know the counter is
locked by another user after 10 tries (or something like that) and asks if
they want to continue trying or give up and try again later.
HTH
Woody (TMW)
> hi helen:when
>
> i cant understand why wait transantion cant be used, if i want a
> trasanction wait until the first transaction commit the change, then,
> first transaction finish, last trasaction can continue the actions. Whereis
> the conflict?, i dont want the last trasaction comeback and show a messageThat's not quite how wait transactions work. If the first user commits
> to the user saying "the record is using, retry later".
his/her changes, then the second user will still get an error, it just waits
until the commit to do so. If the first user rolls back their changes, then
the second one will go through since nothing really changed.
>implement
> Can you help me to undestand?. Maybe my problems is in the way to
> the counters.If you switch to no-wait transactions, the error will be returned right away
>
> I think too that generator is not a good option because the counters would
> be consecutive
> 1,2,3,4,5.
and you can handle it in a loop that keeps trying until it succeeds. In most
cases, this will be a very short time period if it happens at all. You could
even put a counter in the loop that let's the user know the counter is
locked by another user after 10 tries (or something like that) and asks if
they want to continue trying or give up and try again later.
HTH
Woody (TMW)