DataRelation Constructor (String, String, String, String, String, String[], String[], Boolean)

DataRelation Constructor (String, String, String, String, String, String[], String[], Boolean)

Note: This constructor is new in the .NET Framework version 2.0.

This constructor is provided for design time support in the Visual Studio environment.

Namespace: System.Data
Assembly: System.Data (in system.data.dll)

public DataRelation (
	string relationName,
	string parentTableName,
	string parentTableNamespace,
	string childTableName,
	string childTableNamespace,
	string[] parentColumnNames,
	string[] childColumnNames,
	bool nested
)
public DataRelation (
	String relationName, 
	String parentTableName, 
	String parentTableNamespace, 
	String childTableName, 
	String childTableNamespace, 
	String[] parentColumnNames, 
	String[] childColumnNames, 
	boolean nested
)
public function DataRelation (
	relationName : String, 
	parentTableName : String, 
	parentTableNamespace : String, 
	childTableName : String, 
	childTableNamespace : String, 
	parentColumnNames : String[], 
	childColumnNames : String[], 
	nested : boolean
)

Parameters

relationName

The name of the DataRelation. If a null reference (Nothing in Visual Basic) or an empty string (""), a default name will be given when the created object is added to the DataRelationCollection.

parentTableName

The name of the DataTable that is the parent table of the relation.

parentTableNamespace

The name of the parent table namespace.

childTableName

The name of the DataTable that is the child table of the relation.

childTableNamespace

The name of the child table namespace.

parentColumnNames

An array of DataColumn object names in the parent DataTable of the relation.

childColumnNames

An array of DataColumn object names in the child DataTable of the relation.

nested

A value that indicates whether relationships are nested.

Any DataRelation object created by using this constructor must then be added to the collection with AddRange. Tables and columns with the specified names must exist at the time the method is called, or if BeginInit has been called before calling this constructor, the tables and columns with the specified names must exist at the time that EndInit is called.

Windows 98, Windows 2000 SP4, Windows Millennium Edition, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Framework

Supported in: 2.0

Community Additions

ADD
Show:
© 2016 Microsoft