| |
ADO.NET interview questions: - What are the various ways to implement optimistic locking in ADO.NET?
Following are the ways to implement optimistic locking using ADO.NET:-
When we call “Update” method of Data Adapter it handles locking internally. If the Dataset values are not matching with current data in Database, it raises concurrency exception error. We can easily trap this error using Try. Catch block and raise appropriate error message to the user.
Define a Date time stamp field in the table. When actually you are firing the UPDATE SQL statements, compare the current timesta
|