Subject Re: Deadlock exception occurs but it shouldn't?
Author
Thank you Hugo, I was bit reluctant to use WITH LOCK since documentation discourages its usage.
I've tried it but it did not help.

Documentation says:

"The main purposes of explicit locks are (1) to prevent expensive handling of update conflict errors in heavily loaded application"

this is the exact reason I try to avoid conflicts. My threads can wait but they should not raise exceptions.

I always though that it is possible to avoid such conflicts on the database level.