I'm developing an application, and I'm facing a problem about registry competition.
What happens is that I have several people who can access the same record, so I needed that when a user clicked edit, I would allocate that record.
Finding that there is rowlock
but I can not even put this parameter, I can still change the line.
In the example below, I want to block the line whose id
corresponds to 1099, but even doing so, if I run a UPDATE
it executes successfully.
SELECT * FROM crm_man WITH (holdlock,rowlock)
WHERE id = 1099