Hi,
The ForeignKeyConstraint is used when an update or delete is performed on
data in a DataTable that is involved in a relationship. There is an
excellent description of how this works in a DataRelation in the MSDN. The
following explanation is found in this link on the ConstraintCollection
Class found in the MSDN:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/
frlrfsystemdataconstraintcollectionclasstopic.asp
"Note When you add a DataRelation, which creates a relationship between
two tables, to a DataSet, both a ForeignKeyConstraint and a
UniqueConstraint are created automatically. The UniqueConstraint is applied
to the primary key column in the parent DataTable, and the constraint is
added to that table's ConstraintCollection. The ForeignKeyConstraint is
applied to the primary key column and the foreign key column, and the
constraint is added to the child table's ConstraintCollection."
Hope this information is helpful.
Harold Ommert
Microsoft Developer Support
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.