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

Answers were Sorted based on User's Feedback



When multiple users attempt to modify data at the same time Ex user 1 is updating record at same ti..

Answer / 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

When multiple users attempt to modify data at the same time Ex user 1 is updating record at same ti..

Answer / kiranmadiraju

You can use one primary key and one timestamp field to sort
out the problem of concurrency.
The steps are like this
1.Fetch the record from database and store the primary key
value and timestamp in the session.
2.Update the same record with new values other fields using
the same session values for primary key and timestamp fields.

Is This Answer Correct ?    7 Yes 2 No

When multiple users attempt to modify data at the same time Ex user 1 is updating record at same ti..

Answer / shweta

we can have to use exclusive locks on the table thats why
we can't change data at a time..

Is This Answer Correct ?    3 Yes 1 No

When multiple users attempt to modify data at the same time Ex user 1 is updating record at same ti..

Answer / gt

provide the transactionlevels

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More ADO.NET Interview Questions

What are the different row versions available?

3 Answers  


What is sql command in ado net?

0 Answers  


Give an example that shows how to execute a stored procedure in ado.net?

0 Answers  


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

0 Answers   CDC,


Differnce between Stored procedure and user defined functions?

17 Answers   Microsoft, Symphony,






If we want to connect to many databases in dataaccess layer such as MSAccess,Sql server,oracle means not to a particular database depends on condition we have to connect to appropriate database in this scenario if we without changing code Ho wdo you handle this situation?

4 Answers   Honeywell,


Difference between ADO and ADO.net ?

11 Answers   Accenture, BirlaSoft, College School Exams Tests, Krest, Red Apple,


What is method to get XML and schema from Dataset? getXML() and get Schema ()

0 Answers  


What are the different namespaces used in the project to connect the database?

3 Answers  


What is difference between dataset and datatable?

0 Answers  


What provider ADO.net use by default ?

5 Answers   Accenture, BirlaSoft, Wipro,


What is dataset and tell about its features. What are equivalent methods of previous, next etc. Of ADO in ADO.NET ?

1 Answers   Digital GlobalSoft,


Categories