Hi everyone,
I have been facing this problem for long time.
I have two BUTTONS on my form. btnNEXT,btnSUBMIT ..
when user clicks on btnNEXT,details of the next record are displayed. Then user enters some data and clicks on btnSUBMIT. This action will update the details of that particular record.
Now, I have around 10 users working on it. when user1 clicks on btnNEXT, he ll get a record to modify. Now i want that record to be locked and no other user can see that record. when User1 enters details and clicks on btnSUMBIT, the record ll be updated and lock will be released.
Another Scenario:
User1 clicks on btnNEXT. then the record ll be locked. If the user closed the application without updating any data, the record should be unlocked.
What I have done:
Begin tran Select top 1 * from table with (updlock,readpast) where ...
Go to the complete details ...