70-528VB MCTS Braindump
ExamSoon 70-528VB Exams
Microsoft MS.NET Framework 2.0-Web-based Client Development
O rder : 70-528VB Exam
Practice Exam: 70-528VB
Exam Number/Code: 70-528VB
Exam Name: MS.NET Framework 2.0-Web-based Client Development
Questions and Answers: 73 Q&As
Free 70-528VB Braindumps
Exam : Microsoft 70-528VB
Title : MS.NET Framework 2.0-Web-based Client Development
1. You are creating a Web Form to report on orders in a database. You create a DataSet that contains Order and
OrderDetails tables. You add a relationship between the tables by using the following code segment.
Dim dtOrders As DataTable = dsOrders.Tables("Orders")
Dim dtOrderDetails As DataTable = _
dsOrders.Tables("OrderDetails")
Dim colParent As DataColumn = dtOrders.Columns("OrderID")
Dim colChild As DataColumn = _
dtOrderDetails.Columns("OrderID")
dsOrders.Relations.Add("Rel1", colParent, colChild, False)
You need to calculate the total quantity of items for each order by adding the values in the Quantity column in the
OrderDetails rows for each order.
Which code segment should you use?
A. Dim parentRow As DataRow
For Each parentRow In dtOrders.Rows
currQty = 0
Dim childRow As DataRow
For Each childRow In dtOrderDetails.Rows
currQty += Convert.ToInt32(childRow("Quantity"))
Next childRow
ShowQty(currQty)
Next parentRow
B. Dim parentRow As DataRow
For Each parentRow In dtOrders.Rows
currQty = 0
Dim childRow As DataRow
For Each childRow In parentRow.GetChildRows("Rel1")
currQty += Convert.ToInt32(childRow("Quantity"))
Next childRow
ShowQty(currQty)
Next parentRow
C. Dim childRow As DataRow
For Each childRow In dtOrders.Rows
currQty = 0
Dim parentRow As DataRow
For Each parentRow In childRow.GetParentRows("Rel1")
currQty += Convert.ToInt32(childRow("Quantity"))
Next parentRow
ShowQty(currQty)
Next childRow
D. Dim parentRow As DataRow
For Each parentRow In dtOrders.Rows
currQty = 0
Dim childRows As DataRow() = _
parentRow.GetChildRows("Rel1")
currQty += childRows.Length
ShowQty(currQty)
Next parentRow
Answer: B
2. Yo