System.Data.UniqueConstraint Class

Represents a restriction on a set of columns in which all values must be unique.

See Also: UniqueConstraint Members


[System.ComponentModel.Editor("Microsoft.VSDesigner.Data.Design.UniqueConstraintEditor, Microsoft.VSDesigner, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.Drawing.Design.UITypeEditor, System.Drawing, Version=, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public class UniqueConstraint : Constraint


The System.Data.UniqueConstraint is enforced on a single column (or columns) to ensure that a primary key value is unique.

Constraints are not enforced unless the DataSet.EnforceConstraints property is set to true.

When the a System.Data.DataSet is merged with a second System.Data.DataSet, constraints are not enforced until all merges are completed.


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