Microsoft
70-518 · Question #2
You are designing the data access layer (DAL) for an application that uses Microsoft SQL Server 2008, Microsoft ADO.NET, and Microsoft Visual Studio 2010. Conflicts are occurring in the SQL Server…
The correct answer is D. Use optimistic locking. In the DBConcurrencyException exception handler, display the data of. See the full explanation below for the reasoning.
Question
You are designing the data access layer (DAL) for an application that uses Microsoft SQL Server 2008, Microsoft ADO.NET, and Microsoft Visual Studio 2010. Conflicts are occurring in the SQL Server database due to concurrent updates. You need to design a database locking strategy that meets the following requirements:
- Resolves concurrent update conflicts without loss of data
- Ensures that data conflicts can be resolved by users
- Locks only the data necessary for updates
What should you do?
Options
- AUse optimistic locking. Terminate the update when a DBConcurrencyException occurs.
- BUse pessimistic locking. Terminate the update when a DBConcurrencyException occurs.
- CUse pessimistic locking. Retry the failing update operation in the DBConcurrencyException
- DUse optimistic locking. In the DBConcurrencyException exception handler, display the data of
How the community answered
(15 responses)- A13% (2)
- B7% (1)
- C7% (1)
- D73% (11)
Community Discussion
No community discussion yet for this question.