70-553  Exam

Exam # of questions Description  Update
70-553 165 70-553... 02/15/2011
[Practice Test]    [Download Study Guide(PDF)]   [Update Exam]

70-553 - Exam Information
  • Description: MCSD MS.NET Skills to MCPD Enterprise Application Developer Pt1
  • Passing Score: 75%
  • Practice Test - Number of questions: 165 questions
  • Simulation Test - Number of questions: 165 questions
  • Simulation Test Duration: 90 minutes
  • Has explanations: No

Question of the day

You are creating a Windows Forms application that includes the database helper methods UpdateOrder and UpdateAccount. Each method wraps code that connects to a Microsoft SQL Server 2005 database, executes a Transact-SQL statement, and then disconnects from the database. You must ensure that changes to the database that result from the UpdateAccount method are committed only if the UpdateOrder method succeeds. You need to execute the UpdateAccount method and the UpdateOrder method. Which code segment should you use?

Answer(s)

  1. using (TransactionScope ts = new TransactionScope()) { UpdateOrder(); UpdateAccount();ts.Complete();}
  2. using (TransactionScope ts1 = new TransactionScope()) { UpdateOrder(); using(TransactionScope ts2 =new TransactionScope(TransactionScopeOption.RequiresNew)){ UpdateAccount();ts2.Complete(); }ts1.Complete();}
  3. using (TransactionScope ts = newTransactionScope(TransactionScopeOption.RequiresNew)){UpdateOrder(); ts.Complete();}using (TransactionScope ts = newTransactionScope(TransactionScopeOption.Required)){ UpdateAccount(); ts.Complete();}
  4. using (TransactionScope ts = newTransactionScope(TransactionScopeOption.RequiresNew)){UpdateOrder();}using (TransactionScope ts = newTransactionScope(TransactionScopeOption.Required)){UpdateAccount(); ts.Complete();}
Correct Answer

using (TransactionScope ts = new TransactionScope()) { UpdateOrder(); UpdateAccount();ts.Complete();}