You create a Web Form that displays a GridView. The GridViews data source is a DataSet named dsOrders. The DataSet contains two DataTables named Orders and OrderDetails. You create a relation between the two DataTables using the following code segment. (L

题目

You create a Web Form that displays a GridView. The GridViews data source is a DataSet named dsOrders. The DataSet contains two DataTables named Orders and OrderDetails. You create a relation between the two DataTables using the following code segment. (Line numbers are included for reference only.)01 dtOrders = dsOrders.Tables[“Orders”]; 02 dtOrderDetails = dsOrders.Tables[“OrderDetail”]; 03 colParent = dtOrders.Columns[“OrderID”]; 04 colChild = dtOrderDetails.Columns[“ParentOrderID”]; 05 dsOrders.Relations.Add(“Rell”, colParent, colChild, false); You need to find the cause of the exception being raised in line 05. What should you do? ()

A. Ensure that the child column and the parent column have the same names.

B. Ensure that the child table and the parent table have the same names.

C. Ensure that the child column and the parent column have the same data types.

D. Ensure that each row in the child table has a corresponding row in the parent table.

E. Ensure that the tables have an explicit relationship defined by a foreign key constraint in the database.


相似考题
参考答案和解析
参考答案:C
更多“You create a Web Form that displays a GridView. The GridViews data source is a DataSet nam ”相关问题
  • 第1题:

    在js文件中,通过()获取data-* 的属性值

    A.e.detail.value

    B.e.detail.data

    C.e.currentTarget.dataset

    D.e.currentTarget.dataset.*


    e.currentTarget.dataset.*

  • 第2题:

    在js文件中,通过()获取data-* 的属性值。

    A.e.currentTarget.dataset.*

    B.e.detail.value

    C.e.currentTarget.dataset

    D.e.detail.data


    e.currentTarget.dataset.*

  • 第3题:

    DataSet类包含在()命名空间中。

    A.System.Data

    B.System.DataSet

    C.System.Data.SqlClient

    D.System.Data.Oledb


    System.Data

  • 第4题:

    在js文件中,通过()获取data-* 的属性值。

    A.e.detail.value

    B.e.detail.data

    C.e.currentTarget.dataset

    D.e.currentTarget.dataset.*


    e.currentTarget.dataset.*

  • 第5题:

    form表单应用于web客户端与web服务器间传递数据,下列哪些属性用于form标签。()

    A.target

    B.name

    C.action

    D.method


    ABCD

  • 第6题:

    (算法设计) 说明二分查找的基本思想,并用C/C++语言实现下面的二分查找(折半查找)函数。 bool BSearch(int * source,int n, int data) ; // 在source[n]中查找数据data


    设输入是一个按非降次序排列的元素表 A[i :j] 和 x,选取 A[(i+j)/2] 与 x 比较,如果A[(i+j)/2]=x ,则返回 (i+j)/2 ,如果 A[(i+j)/2]A[ (i+j)/2+1 :j] 找 x。上述过程被反复递归调用。