System.Data Namespace
Represents a restriction on a set of columns in which all values must be unique.
Visibility |
Constructor |
Parameters |
public |
UniqueConstraint |
(
String
name
,
DataColumn
column
)
|
public |
UniqueConstraint |
(
DataColumn
column
)
|
public |
UniqueConstraint |
(
String
name
,
DataColumn
columns
)
|
public |
UniqueConstraint |
(
DataColumn
columns
)
|
public |
UniqueConstraint |
(
String
name
,
String
columnNames
,
Boolean
isPrimaryKey
)
|
public |
UniqueConstraint |
(
String
name
,
DataColumn
column
,
Boolean
isPrimaryKey
)
|
public |
UniqueConstraint |
(
DataColumn
column
,
Boolean
isPrimaryKey
)
|
public |
UniqueConstraint |
(
String
name
,
DataColumn
columns
,
Boolean
isPrimaryKey
)
|
public |
UniqueConstraint |
(
DataColumn
columns
,
Boolean
isPrimaryKey
)
|
|
The UniqueConstraint is enforced on a single column ( or columns ) to ensure that a primary key value is unique.
Constraints are not enforced unless the EnforceConstraints property is set to true.
When a DataSet is merged with a second DataSet, constraints are not enforced until all merges are completed.
The following example adds a UniqueConstraint to a DataSet and sets the EnforceConstraints property to true.
[ xample to be supplied. ]
Constraint Constraints ConstraintCollection DataRelation ForeignKeyConstraint