• 2022-06-08
    dt为DataTable类型的变量,引用名为"Customers"的DataTable对象。该表中包含"CustomerID"、"CustomerName"、"Address"、"Telephone"等4列。将数据列"CustomerID"设为该表的主键的正确语句有:()
    A: dt.PrimaryKey="CustomerID";
    B: dt.PrimaryKey.Add("CustomerID");
    C: dt.PrimaryKey=newobject[]{"CustomerID"};
    D: dt.PrimaryKey=newDataColumn[]{dt.Columns["CustomerID"]};
  • 举一反三