Last post Jan 11, 2019 09:52 AM by Jenifer Jiang
Jan 11, 2019 06:03 AM|vinodkpasi|LINK
What is the difference between DataRelation and ForeignKeyConstraint in ADO.NET?
Jan 11, 2019 09:52 AM|Jenifer Jiang|LINK
A DataRelation is used to relate two DataTable objects to each other through DataColumn objects.
For example, in a Customer/Orders relationship, the Customers table is the parent and the Orders table is the child of the relationship.
This is similar to a primary key/foreign key relationship.
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.
A DataRelation object can be used to create and enforce a foreign-key constraint, which can be used to maintain referential integrity between a parent and child table in a dataset.
The DataRelation object is a more general term and can be used for other functions also.
For more, you could refer to the following links to check the details and related samples.