nerdexam
Microsoft

70-516 · Question #187

70-516 Question #187: Real Exam Question with Answer & Explanation

Sign in or unlock 70-516 to reveal the answer and full explanation for question #187. The question stem and answer options stay visible for context.

Question

You use Microsoft Visual Studio 2010 and Microsoft .NET Framework 4.0 to create an application. The application connects to two different Microsoft SQL Server 2008 database servers named Server1 and Server2. A string named sql1 contains a connection string to Server1. A string named sql2 contains a connection string to Server2. 01 using (TransactionScope scope = new 02 ... 03 ) 04 { 05 using (SqlConnection cn1 = new SqlConnection(sql1)) 06 { 07 try{ 08 ... 09 } 10 catch (Exception ex) 11 { 12 } 13 } 14 scope.Complete(); 15 } You need to ensure that the application meets the following requirements: - There is a SqlConnection named cn2 that uses sql2. - The commands that use cn1 are initially enlisted as a lightweight transaction. The cn2 SqlConnection is enlisted in the same TransactionScope only if commands executed by cn1 do not throw an exception. What should you do?

Options

  • AInsert the following code segment at line 02.
  • BInsert the following code segment at line 02.
  • CInsert the following code segment at line 02.
  • DInsert the following code segment at line 02.

Unlock 70-516 to see the answer

You've previewed enough free 70-516 questions. Unlock 70-516 for full answers, explanations, the timed quiz mode, progress tracking, and the master PDF. Question stem and options stay visible so you can still see what's on the exam.

Full 70-516 Practice