PdfPrep.com

Which code segment should you use?

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.

Exit mobile version