Microsoft
70-516 · Question #170
70-516 Question #170: Real Exam Question with Answer & Explanation
Sign in or unlock 70-516 to reveal the answer and full explanation for question #170. The question stem and answer options stay visible for context.
Question
You use Microsoft .NET Framework 4.0 to develop an application. You write the following code to update data in a Microsoft SQL Server 2008 database. (Line numbers are included for reference only.) 01 private void ExecuteUpdate(SqlCommand cmd, string connString, string updateStmt) 02 { 03 ... 04 } You need to ensure that the update statement executes and that the application avoids connection leaks. Which code segment should you insert at line 03?
Options
- ASqlConnection conn = new SqlConnection(connString);
- Busing (SqlConnection conn = new SqlConnection(connString))
- Cusing (SqlConnection conn = new SqlConnection(connString))
- DSqlConnection conn = new SqlConnection(connString);
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.