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

Diff b/w DataReader,Dataset and Data table?

5 Answers   HCL,


Why is it important to close an ado.net application?

0 Answers  


What are the steps in connecting to database?

3 Answers   IBM, Microsoft,


What is sequence of code in retrieving data from database ?

3 Answers   Accenture, BirlaSoft,


What is aggregate root?

0 Answers  






Describe ado.net object model in detail.

0 Answers  


what is connection pooling ?

3 Answers   Vertex,


Which is faster datareader or dataadapter?

0 Answers  


What is an ado connection?

0 Answers  


Explain the basic use of "dataview" and explain its methods.

0 Answers  


WHAT Are the major major compnents of a data provider in ADO.net.

14 Answers   Infosys, Wipro,


Which is the best institute in hyderabad to learn DotNet?

11 Answers   Cognizant,


Categories