Dim custDS As DataSet = New DataSet("CustomerOrders")
Dim ordersTable As DataTable = custDS.Tables.Add("Orders")
Dim pkCol As DataColumn = ordersTable.Columns.Add("OrderID", Type.GetType("System.Int32"))
ordersTable.Columns.Add("A", Type.GetType("System.Int32"))
ordersTable.Columns.Add("B", Type.GetType("System.String"))
'ordersTable.PrimaryKey = New DataColumn() {pkCol}
'新しい行を追加
Dim datarow As DataRow = ordersTable.NewRow() '新しい行を追加
datarow("A") = 1
datarow("B") = "aiueo"
ordersTable.Rows.Add(datarow)
0 件のコメント:
コメントを投稿