Subject INSERT or Update and conflict
Author svanderclock
hello,

I have a very intensive database application. Impossible for me to know
if 2 clients are inserting or updating in the database the same row at
the same time.

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 ?

now in the same kind, sometime i get 'Update Error - lock conflict on
no wait transaction'. it's when 2 clients try to update the same row at
the same time. here also how to handle such situation ? is it possible
to force the update of the row by the second request instead of raising
a lock conflict?

thanks by advance
stephane