Microsoft
70-516 · Question #202
70-516 Question #202: Real Exam Question with Answer & Explanation
Sign in or unlock 70-516 to reveal the answer and full explanation for question #202. 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 a Microsoft SQL Server database. The application has two DataTable objects that reference the Customers and Orders tables in the database. The application contains the following code segment. (Line numbers are included for reference only.) 01 DataSet customerOrders = new DataSet(); 02 customerOrders.EnforceConstraints = true; 03 ForeignKeyConstraint ordersFK = new ForeignKeyConstraint("ordersFK", 04 customerOrders.Tables["Customers"].Columns["CustomerID"], 05 customerOrders.Tables["Orders"].Columns["CustomerID"]); 06 ... 07 customerOrders.Tables["Orders"].Constraints.Add(ordersFK); You need to ensure that an exception is thrown when you attempt to delete Customer records that have related Order records. Which code segment should you insert at line 06?
Options
- AordersFK.DeleteRule = Rule.SetDefault;
- BordersFK.DeleteRule = Rule.None;
- CordersFK.DeleteRule = Rule.SetNull;
- DordersFK.DeleteRule = Rule.Cascade;
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.