Hello,
VS 2005 using Typed Datasets.
I have this problem that I am trying to fill 2 data tables 'Orders' (parent table) and 'OrderDetails' (child table).
In the dataset designer I have added the relationship between them.
I what I have tried a different combination of the above. I know that by default the data table is cleared, so if there are values in the child table, then it might throw this error. So setting it to false didn't work.
When i enforce constraints to false, but as soon as I set it to true after the data tables are filled, it will throw the error.
Error Message:
"Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints"
Many thanks for any assistance,
R
VS 2005 using Typed Datasets.
I have this problem that I am trying to fill 2 data tables 'Orders' (parent table) and 'OrderDetails' (child table).
In the dataset designer I have added the relationship between them.
Code:
Me.DsAddComponetAndEquipment1.EnforceConstraints = False
Me.TA_Orders_dsCodered1.ClearBeforeFill = False
Me.TA_Orders_dsCodered1.Fill(Me.DsAddComponetAndEquipment1.Orders)
Me.TA_OrderDetails_dsCodeRed1.Fill(Me.DsAddComponetAndEquipment1.OrderDetails)
Me.DsAddComponetAndEquipment1.EnforceConstraints = True
I what I have tried a different combination of the above. I know that by default the data table is cleared, so if there are values in the child table, then it might throw this error. So setting it to false didn't work.
When i enforce constraints to false, but as soon as I set it to true after the data tables are filled, it will throw the error.
Error Message:
"Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints"
Many thanks for any assistance,
R