Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
DataRelationCollection Class
Collapse the table of content
Expand the table of content

DataRelationCollection Class

Represents the collection of DataRelation objects for this DataSet.

For a list of all members of this type, see DataRelationCollection Members.


[Visual Basic]
MustInherit Public Class DataRelationCollection
   Inherits InternalDataCollectionBase
public abstract class DataRelationCollection :
public __gc __abstract class DataRelationCollection : public
abstract class DataRelationCollection extends

Thread Safety

This type is safe for multithreaded read operations. You must synchronize any write operations.


A DataRelationCollection object enables navigation between related parent/child DataTable objects.

You create a DataRelationCollection object by defining it as a property of either the DataSet or the DataTable, rather than by directly using a constructor. (Use the Relations property of the DataSet, or the ParentRelations property of the DataTable.)

To access the collection, use the Relations property of the DataSet object.

Once the collection exists you can manage the objects it contains by using methods such as Add, Clear, and Remove.


Namespace: System.Data

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

Assembly: System.Data (in System.Data.dll)

See Also

DataRelationCollection Members | System.Data Namespace | Add | DataSet | Relations | DataRelation | Remove

© 2015 Microsoft