Hi,
I would try changing or removing DataTable.Constraints and then reapplying
them.
--
Miha Markic [MVP C#] - RightHand .NET consulting & development
miha at rthand com
www.rthand.com
"W.G. Rowland" <(E-Mail Removed)> wrote in message
news:%(E-Mail Removed)...
>I have an empty database I need to do some bulk data filling on from a
>collection of datatables.. Since there are various constraints that are
>invalid until all the data is uploaded I need to turn off constraint
>checking while the DataAdapter.Update command is running.
>
> All this was fine until I decided there was no reason to be using datasets
> when all they were doing were wrapping single datatables..
>
> The problem.. I can't find any equivalent of .EnforceConstraints in the
> datatable..
>
> I wrap the code in a dataset, turn .EnforceConstraints=false, then send
> the datatable (extracted out of the dataset because the database code
> expects a datatable) and the update works fine..
>
> I take the same datatable without wrapping it in a dataset and the update
> crashes due to constraint issues..
>
> The dataset is obviously performing some kind of operation on the
> datatable when the flag is set... But how do I do the same thing to the
> datatable directly? Is there a way?
>
> Thanks in advance,
> WGR
>