Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update DataSetConverter.cs #2818

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Update DataSetConverter.cs #2818

wants to merge 1 commit into from

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.
@Lucho100789 Lucho100789 linked an issue Mar 12, 2023 that may be closed by this pull request
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