Subject Re: INSERT or Update and conflict
Author svanderclock
> >so some time i get some violation of PRIMARY or UNIQUE KEY when 2
> >client do an INSERT because at the same time these 2 clients do the
> >same insert and unfortunatly one of them go in the violation of
primary
> >key.... I just want to know the best way to handle such situation ?
>
> If you can, use GENERATORs

unfortunatly i can not use generator here, and the probleme is not to
generate the key or duplicate key, it's when 2 clients work simultany
on the same row...


> > is it possible to force the update of the row by the second
request
> > instead of raising a lock conflict?
>
> YES. Setup your transactions as WAIT
>
> This way, users don't get a messaging saying it can't update,
instead, it
> will wait until the transaction that updated the record is commited
or
> roledback. USE THIS WITH CAUTION.



hmm, but as far as i know, if the reccord is commited, whith the WAIT
i will still get the error, only if the reccord is rollbacked i will
not receive the error with the wait .... i m mistake ?

thanks again
stephane