System.Data.InvalidConstraintException Class

Represents the exception that is thrown when incorrectly trying to create or access a relation.

See Also: InvalidConstraintException Members

Syntax

public class InvalidConstraintException : DataException

Remarks

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.

Requirements

Namespace: System.Data
Assembly: System.Data (in System.Data.dll)
Assembly Versions: 1.0.3300.0, 1.0.5000.0, 2.0.0.0