表中联合主键,用datatable的find方法如何查找?
DataRow rowPub_DeptProcInfo = dt.Rows.Find(rows[0]["DeptProcNo"]["DeptProcName"]); --------------------编程问答-------------------- private void FindInMultiPKey(DataTable myTable){DataRow foundRow;
// Create an array for the key values to find.
object[]findTheseVals = new object[3];
// Set the values of the keys to find.
findTheseVals[0] = "John";
findTheseVals[1] = "Smith";
findTheseVals[2] = "5 Main St.";
foundRow = myTable.Rows.Find(findTheseVals);
// Display column 1 of the found row.
if(foundRow != null)
Console.WriteLine(foundRow[1]);
}
这个应该对你有帮助
--------------------编程问答-------------------- 表包含行,行有包含表,根据这样的对象结构,你不难发现规律的
补充:.NET技术 , C#