public DataRelation(string relationName, System.Data.DataColumn parentColumn, System.Data.DataColumn childColumn, bool createConstraints)

public DataRelation(string relationName, System.Data.DataColumn
parentColumn, System.Data.DataColumn childColumn, bool
createConstraints)
Member of System.Data.DataRelation

Summary:
Initializes a new instance of the System.Data.DataRelation class using
the specified name, parent and child System.Data.DataColumn objects,
and a value that indicates whether to create constraints.

Parameters:
relationName: The name of the relation. If null or an empty string
(""), a default name will be given when the created object is added to
the System.Data.DataRelationCollection.
parentColumn: The parent System.Data.DataColumn in the relation.
childColumn: The child System.Data.DataColumn in the relation.
createConstraints: A value that indicates whether constraints are
created. true, if constraints are created. Otherwise, false.

Exceptions:
System.ArgumentNullException: One or both of the
System.Data.DataColumn objects contains null.
System.Data.InvalidConstraintException: The columns have different
data types -Or- The tables do not belong to the same
System.Data.DataSet.

No comments:

Post a Comment