Represents an action restriction enforced on a set of columns in a primary key/foreign key relationship when a value or row is either deleted or updated.
See Also: ForeignKeyConstraint Members
A System.Data.ForeignKeyConstraint restricts the action performed when a value in a column (or columns) is either deleted or updated. Such a constraint is intended to be used with primary key columns. In a parent/child relationship between two tables, deleting a value from the parent table can affect the child rows in one of the following ways.
The child rows can also be deleted (a cascading action).
The values in the child column (or columns) can be set to null values.
The values in the child column (or columns) can be set to default values.
An exception can be generated.
System.Data.ForeignKeyConstraint objects are contained in the System.Data.ConstraintCollection of a System.Data.DataTable, which is accessed through the DataTable.Constraints property.
Constraints are not enforced unless the DataSet.EnforceConstraints property is set to true.
The ForeignKeyConstraint.AcceptRejectRule is enforced whenever a System.Data.DataTable object's DataTable.AcceptChanges method is invoked.