Dataset is the disconnected environment. suppose if you are binding records to gridview (disconnected environment) and you are making changes to the the grid but before updating the database if any other user modify the data, how will you avoid such problem?



Dataset is the disconnected environment. suppose if you are binding records to gridview (disconnecte..

Answer / Kuvar Sen

In a disconnected environment where multiple users can modify data independently, implementing concurrency control mechanisms is essential to prevent conflicts. To avoid issues with simultaneous modifications, consider the following strategies:
1. Optimistic Concurrency Control (OCC): This approach assumes that conflicts are rare and checks for changes made by other users before saving the updates. You can use a version number or timestamp to identify modified records. If the record has been updated since it was last retrieved, an error is thrown, and the user must refresh the data and retry the operation.
2. Pessimistic Concurrency Control (PCC): This approach assumes that conflicts are common and locks records while they are being edited to prevent other users from modifying them simultaneously. When a user wants to make changes, the record is locked until the update is committed or rolled back. This can lead to decreased concurrency and increased lock contention.
3. Use of transactions: Ensuring that all database operations are grouped into a transaction can help maintain data consistency by either committing all changes at once or rolling back all changes if an error occurs.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More ASP.NET Interview Questions

What is state management in asp.net with example?

1 Answers  


What is a DLL Hell Problem in .Net?

12 Answers  


Which object is used to encapsulate the state of the client and the browser in ASP.NET?

1 Answers   Sans Pareil IT Services,


What is rich control in asp.net?

1 Answers  


Explain what is postback in asp. Net?

1 Answers  


What are server objects?

1 Answers  


Describe how ASP.NET maintains process isolation for each Web application?

1 Answers   B-Ways TecnoSoft,


COM+ Used ________________ Isolation Level

1 Answers   CTS,


What is css in asp.net?

1 Answers  


when is the role performed by IIS sever when ever a request send from browser

0 Answers  


In which event of the page viewstate is available?

1 Answers  


Explain the life cycle of an ASP .NET page

2 Answers   HCL, Surya Software,


Categories