Which code segment should you use?

Posted by: Pdfprep Category: 70-487 Tags: , ,

You need to update the CreateMonthlyTotalsReports() method to use database transactions.

Which code segment should you use?
A . SqlConnection.BeginTransaction(IsolationLevel.ReadCommitted);
B . SqlConnection.BeginTransaction(IsolationLevel.ReadUnconwited);
C . SqlConnection.BeginTransaction(IsolationLevel.Chaos);
D . SqlConnection.BeginTransaction(IsolationLevel.Serializable);

Answer: D

Explanation:

* Scenario: The Create MonthlyTotalsReport() method must lock the data and prevent others from updating or inserting new rows until complete.

* Serializable:

A range lock is placed on the DataSet, preventing other users from updating or inserting rows into the dataset until the transaction is complete.

Leave a Reply

Your email address will not be published.