Reservations
One of the most important considerations for any multi-user application is record locking. The program must not allow two users to try to edit the same record at the same time. The database features provided by the SqlDataAdapter may prevent one user from overwriting the changes made by the other, but it will only do that when the second user tries to save his changes to the database. Allowing the user to make the changes in the first place wastes the user’s time and can be very frustrating.
The solution to this problem is to lock the records before allowing the user to edit them. When the user clicks the Edit button, the program can lock the customer’s record in the Customers table. When the second user clicks the Edit button, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access