O'Reilly logo

Sams Teach Yourself ADO.NET in 24 Hours by Paul Bertucci, Jason Lefebvre

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Hour 14

Quiz Answers

1: What must be maintained when using the pessimistic concurrency approach?
  1. Locks on data resources

  2. Database connections

  3. Events

A1: a and b. Both locks on data resources and database connections must be maintained in pessimistic concurrency.
2: In general, how is optimistic concurrency implemented?
  1. Compare original values to current values in the data source

  2. Identify key changes, then commit updates

  3. Delete old values, then insert new values

A2: a. In general, you will need to compare original values (that you read from the data source) to current values in the data source before the data can be updated. If any of the comparison fails (indicating that the row was updated by someone else), you have encountered an optimistic concurrency ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required