dtOrders = dsOrdres.Tabls["orders"];
dtOrderDetails=dsOrders.Tables{"orderDetail"];
colParent=dtOrders.Columns['OrderID"];
colChild = dtOrderDetails.Columns["ParentOrderID"];
dsOrders.Relations.Add("Rell",colParent,colChild, false);
运行后发现出错,有2个答案,选一个:
1.Ensure that the child column and parent column have the same datatype
2.Ensure that each row in the child table has a corresponding row in the parent table
我在一些资料上看到是1,但另一些是2,实际试了试也没出错,有人能解释一下吗。到底那个对。
dtOrderDetails=dsOrders.Tables{"orderDetail"];
colParent=dtOrders.Columns['OrderID"];
colChild = dtOrderDetails.Columns["ParentOrderID"];
dsOrders.Relations.Add("Rell",colParent,colChild, false);
运行后发现出错,有2个答案,选一个:
1.Ensure that the child column and parent column have the same datatype
2.Ensure that each row in the child table has a corresponding row in the parent table
我在一些资料上看到是1,但另一些是2,实际试了试也没出错,有人能解释一下吗。到底那个对。