I'm using CS 4.0. I'm getting an SQL exception: "Transaction (process ID 56) was deadlocked on lock | generic waitable object resources with another process and has been chosen as the deadlock victim. Rerun the transaction."
The query being executed is
LockProcessGuid = @LockProcessGuid,
LockInstanceNumber = @LockInstanceNumber
WHERE PatientProtocolId = @PatientProtocolId
where the appropriate parameters have been passed in.
When the exception occurs, I can try to run the update from MSSMS. When I do, it does not terminate; I have to stop it.
My guess is that either the table or a record is being locked. It does not seem to depend on the values of the parameters, so probably the table. I've tried running
SELECT * FROM sys.dm_tran_locks
but am not sure what the results mean.