Skip to content

Conversation

@rgb4321
Copy link

@rgb4321 rgb4321 commented Feb 16, 2023

Typed datasets are serialized in whatever order tables were added (usually via the designer). If there is a foreign key constraint and the child table happened to be added by the developer prior to the parent table, deserialization could fail with an InvalidConstraintException. To avoid that, set EnforceConstraints to false prior to deserializing the dataset and then set it back to true when deserialization is complete.

Typed datasets are serialized in whatever order tables were added (usually via the designer).  If there is a foreign key constraint and the child table happened to be added by the developer prior to the parent table, deserialization could fail with an InvalidConstraintException.  To avoid that, set EnforceConstraints to false prior to deserializing the dataset and then set it back to true when deserialization is complete.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[]()

1 participant