Name

ConstraintException

Synopsis

This exception is thrown if you attempt an action that violates a constraint or if you try to apply a constraint to a DataTable that contains rows that violate it. For example, you might try to create more than one row with the same value in a unique column or a child record that references a nonexistent parent.

public class ConstraintException : DataException {

// Public Constructors

   public ConstraintException( );  

   public ConstraintException(string s);  

// Protected Constructors

   protected ConstraintException(System.Runtime.Serialization.SerializationInfo info, 

        System.Runtime.Serialization.StreamingContext context);

}

Hierarchy

System.Object System.Exception(System.Runtime.Serialization.ISerializable) System.SystemException DataException ConstraintException

Get ADO.NET in a Nutshell now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.