System.Data Namespace
Represents the exception that is thrown when incorrectly attempting to create or access a relation.
The InvalidConstraintException is thrown when incorrectly invoking the following methods while attempting to create or access a relation.
If you call Add, the InvalidConstraintException may be thrown if a relation cannot be created based on the values supplied in the parameters. If you call Clear, the InvalidConstraintException may be thrown if a ForeignKeyConstraint is enforced on the DataRowCollection. If you call GetParentRow, the InvalidConstraintException may be thrown if the columns have different data types or the tables do not belong to the same DataSet.
Constraint Constraints ConstraintCollection DataRelation ForeignKeyConstraint