Share via


Troubleshooting Exceptions: System.Data.ConstraintException 

A ConstraintException exception is thrown when an action is attempted that violates a constraint.

Associated Tips

  • Relax or turn off constraints in your DataSets.
    You can use the EnforceConstraints property to temporarily turn off constraints while filling tables in a DataSet object.
  • Clear datasets before loading them from view state.
    If there is data in the dataset when you load it, this exception may be thrown.

See Also

Tasks

How to: Find Out More About an Exception with the Exception Assistant
How to: Update a DataRow with the Value from a Variable (Visual Basic)

Reference

ConstraintException