Hi all
Really need some help with lock and cascade deletes.
My app needs pesimistic locking.
So i lock records using (updlock, rowlock).
Scenario
The design is, Table 1 has many records in Table 2.
User 1 locks a record for edit in Table 2 (with a trans).
User 2 deletes an unrelated record in Table 1 which will delete related records in Table 2 (which are not locked).
I cannot get this to work. Even though user 2 is deleting records that are not locked, it always times out.
I have tried triggers and RI in a diagram, but it wont work.
Any help is greatly appreciated.
Thanks
ITflash