-->

22 February 2020

ADO.NET DataRelation

  Asp.Net CS By Example       22 February 2020
 ADO.NET DataRelation 

 In this post we are exploring more about DataRelation class. We use an object of the DataRelation class to represent a relationship between two DataTable objects. we can use a DataRelation object to model parent-child relationships between two database tables. We can store multiple DataRelation objects in a DataSet.

Here some of the DataRelation properties:

Sr.No Property Type Description
1) ChildColumns DataColumn[] Gets the array of DataColumn objects that represent the child columns for the DataRelation.
2) ChildKeyConstraint ForeignKeyConstraint Gets the ForeignKeyConstraint object for the DataRelation.
3) ChildTable DataTable Gets the child DataTable object for the DataRelation.
4) DataSet DataSet Gets the DataSet to which the DataRelation belongs.
5) Nested bool Gets or sets a bool value that indicates whether the DataRelation objects are nested. This is useful when defining hierarchical relationships in XML.
6) ParentColumns DataColumn[] Gets the array of DataColumn objects that represent the parent columns for the DataRelation.
7) ParentKeyConstraint UniqueConstraint Gets the UniqueConstraint object that ensures values in the parent column of the DataRelation are unique.
8) ParentTable string Gets the parent DataTable object for the DataRelation.
9) RelationName string Gets the name of the DataRelation object.
logoblog

Thanks for reading ADO.NET DataRelation

Previous
« Prev Post

No comments:

Post a Comment

Please do not enter any spam link in the comment box.