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 is Pooling? what is data pooling? what is sql pooling?

3 Answers   TCS,


What is variable view?

0 Answers  


What is ado oledb and odbc?

0 Answers  


make a login control??

1 Answers  


What is a datareader object?

0 Answers  






How do we invoke queries from the application ?

2 Answers   ICICI, Microsoft,


Being fresher How would i answer to the question that what is your salary exception?

4 Answers  


What is difference between sqldatareader and sqldataadapter?

0 Answers  


Explain how to pass multiple tables in datasets simultaneously?

0 Answers  


How to identify the controls which can be used for binding data?

0 Answers  


What is data relation?

0 Answers  


What are the advantages of ado.net?

0 Answers  


Categories