You create an application by using the Microsoft .NET Framework 3.5 and Microsoft
ADO.NET. The application connects to a Microsoft SQL Server 2005 database.You create a
DataSet named northwind. The northwind DataSet contains two related tables named
Customers and Orders.You write the following code segment. (Line numbers are included
for reference only.)
01 private void Page_Load(object sender, EventArgs e)
02 {
03 this.ordTblAdap.Fill(this.northwind.Orders);
04 this.custTblAdap.Fill(this.northwind.Customers);
05 }
06 private void custBindNavSaveItem_Click(object sender, EventArgs e)
07 {
08
09 }
The two tables in the northwind DataSet are updated frequently.
You need to ensure that the application commits all the updates to the two tables before it
saves the data to the database.Which code segment should you insert at line 08?
A.
this.Validate();
this.custBindSrc.EndEdit();
this.orderBindsrc.EndEdit();
this.tableAdapterManager.UpdateAll(this.northwind);
B.
this.Validate();
this.tableAdapterManager.UpdateAll(this.northwind);
this.custBindSrc.EndEdit(); this.orderBindsrc.EndEdit();
C.
this.tableAdapterManager.UpdateOrder = demo.northwindTblAdp.TableAdapterManager.UpdateOrderOption.UpdateInsertDelete;
this.custBindSrc.EndEdit();
this.orderBindsrc.EndEdit();
D.
this.tableAdapterManager.UpdateOrder = demo.northwindTblAdp.TableAdapterManager.UpdateOrderOption.InsertUpdateDelete;
this.custBindSrc.EndEdit();
this.orderBindsrc.EndEdit();