Hi Brad,
First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you received a ConstraintException when
trying to call GetChanges method on one of the tables in the DataSet,
although the EnforceConstraints property of the DataSet has been set to
false. If there is any misunderstanding, please feel free to let me know.
As far as I know, this behavior is by design. As the
DataSet.EnforceConstraints property works on DataSet level, it just ignores
the ConstraintExceptions thrown from the DataTables of that DataSet. When
calling GetChanges on a DataTable level, it creates a new DataTable object
with same constraints as the original table and this DataTable doesn't
belong to the DataSet. Since there are duplicate on primary keys, a
ConstraintException is thrown. So if you have had EnforceConstraints set to
false, try not to call GetChanges on the DataTable level.
HTH. If anything is unclear, please feel free to reply to the post.
Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."