When multiple users attempt to modify data at the same time
Ex user 1 is updating record at same time user2 deleted
record sucessfully.now user1 has press update button . how
to handle concurrency

Answer Posted / umar topia

Have one column with in Database table with datatype as
TimeStamp and while selecting the row we will read the
TimeStamp value, which we can compare at the time of updation,

if both values are same then we can update that row
otherwise we can resist the user from updating saying that
someone has updated the row, you can't update it.

Is This Answer Correct ?    13 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is difference between entity framework and ado.net?

588


What is the DataTableCollection?

707


What is openquery?

649


What is difference between Dataview and Datatable?

646


What is the difference between typed and untyped dataset?

622






Explain the dataadapter class in ado.net?

774


How to perform sorting on a table in ADO.NET?

688


What two types of data providers does ADO.NET supply? What determines which one you should use?

649


How does entity framework work?

589


What is ole2 format?

605


Which is faster entity framework or ado.net?

608


What is the use of connection object in ado.net?

690


What is the difference between OLEDB Provider and SqlClient?

645


What is the difference between connected and disconnected environment?

614


Is datareader faster than datatable?

634