The UniqueConstraint Class

The UniqueConstraint Class

You use an object of the UniqueConstraint class to ensure that a DataColumn value, or combination of DataColumn values, is unique for each DataRow in a DataTable. The UniqueConstraint class is derived from the System.Data.Constraint class. Table 12.1 shows the UniqueConstraint properties.

Table 12.1: UniqueConstraint PROPERTIES

PROPERTY

TYPE

DESCRIPTION

Columns

DataColumn[]

Gets the array of DataColumn objects for the UniqueConstraint.

ConstraintName

string

Gets the name of the UniqueConstraint.

ExtendedProperties

PropertyCollection

Gets the PropertyCollection object that you can use to store strings of additional information.

IsPrimaryKey

bool

Gets a bool that indicates whether the UniqueConstraint is a primary key.

Table

DataTable

Gets the DataTable on which the UniqueConstraint was created.




Mastering C# Database Programming
Mastering the SAP Business Information Warehouse: Leveraging the Business Intelligence Capabilities of SAP NetWeaver
ISBN: 0764596373
EAN: 2147483647
Year: 2003
Pages: 181

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net