asp.net.ph

UniqueConstraint Class

System.Data Namespace


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

UniqueConstraint Class Members

Collapse   Constructors

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 )

Collapse   Properties

Visibility Name Value Type Accessibility
public Columns DataColumn [ Get ]
public IsPrimaryKey Boolean [ Get ]
public Table DataTable [ Get ]

Collapse   Methods

Visibility Name Parameters Return Type
public Equals ( Object key2 ) Boolean
public GetHashCode ( ) Int32

Remarks

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.

Example

The following example adds a UniqueConstraint to a DataSet and sets the EnforceConstraints property to true.

 [ xample to be supplied. ]
See Also

Constraint   Constraints   ConstraintCollection   DataRelation   ForeignKeyConstraint Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph