更新时间:2023-11-30 22:58:52
table.PrimaryKey = new DataColumn[]{table.Columns["column1"],table.Columns["column2"]}
搜索时
table.Rows.Find(New Object[]{<value in column1>, <value in column2>})
这将返回一个数据行.并且主键值必须是唯一的,否则会抛出异常.
This will return a datarow. Also the Primary key values must be unique, otherwise an exception will be thrown.