Updating to a database from a detailsview template field
There are three concurrency control strategies available: All of our tutorials thus far have used the default concurrency resolution strategy - namely, we've let the last write win.In this tutorial we'll examine how to implement optimistic concurrency control.
The Data Access Layer must issue a SQL statement that will only update the record if the original values that the user started editing are identical to the values still in the database. Figure 2: For the Update or Delete to Succeed, the Original Values Must Be Equal to the Current Database Values (Click to view full-size image) There are various approaches to implementing optimistic concurrency (see Peter A.
For web applications that allow multiple users to update or delete data, however, there's the potential for one user's modifications to clash with another concurrent user's.
Without any concurrency policy in place, when two users are simultaneously editing a single record, the user who commits her changes last will override the changes made by the first.
Now you can ask questions directly to me on my new site ASPForums.
Net Question Answer site, specially started to allow visitors of this site ask their doubts and queries. Just click the Ask Now button and ask your question now.
For example, if a user locks a record for editing and then leaves for the day before unlocking it, no other user will be able to update that record until the original user returns and completes his update.