MCQOPTIONS
Saved Bookmarks
| 1. |
You develop an enterprise application, called XYZApplication that includes a Windows Form presentation layer, middle-tier components for business logic and data access, and a Microsoft SQL Server database._x005F_x000D_ You are in the process of creating a middle-tier component that will execute the data access routines in your application. When data is passed to this component, the component will call several SQL Server stored procedures to perform database updates. All of these procedure calls run under the control of a single transaction._x005F_x000D_ The code for the middle-tier component will implement the following objects:SqlConnection cn = new SqlConnection();SqlTransaction tr;_x005F_x000D_ If two users try to update the same data concurrently, inconsistencies such as phantom reads will occur. You must now add code to your component to specify the highest possible level of protection against such inconsistencies.Which code segment should you use? |
| A. | tr = cn.BeginTransaction(?ReadCommitted?); |
| B. | tr = cn.BeginTransaction(IsolationLevel.ReadCommitted); |
| C. | tr = cn.BeginTransaction(IsolationLevel.Serializable); |
| D. | tr = cn.BeginTransaction(?Serializable?); |
| Answer» D. tr = cn.BeginTransaction(?Serializable?); | |