Microsoft Exam Questions

Which code should be used?

DRAG DROP
There is MS Visual Studio 2010 and MS .NET Framework 4 application PassGuideApp.
PassGuideApp connects to a MS SQL Server database PassGuideDB.
There is a transaction with two commands.
If the transaction fails to commit or rolls back then error information needs to be logged.
Which code should be used?

Answer:

Explanation: