See Also: InvalidConstraintException Members
The System.Data.InvalidConstraintException is thrown when incorrectly invoking the following methods while trying to create or access a relation.
If you call DataRelationCollection.Add(DataRelation), the System.Data.InvalidConstraintException may be thrown if a relation cannot be created based on the values supplied in the parameters. If you call DataRowCollection.Clear, the System.Data.InvalidConstraintException may be thrown if a System.Data.ForeignKeyConstraint is enforced on the System.Data.DataRowCollection. If you call DataRow.GetParentRow(string), the System.Data.InvalidConstraintException may be thrown if the columns have different data types or the tables do not belong to the same System.Data.DataSet.