asp.net.ph

DataRelationCollection.Add Method

System.Data Namespace   DataRelationCollection Class


Adds a DataRelation to the collection.

Overload List

1. Adds a DataRelation object to the collection.

2. Adds a DataRelation with the given parent and child columns to the collection.

3. Adds a DataRelation with the given arrays of parent and child columns to the collection.

4. Adds a DataRelation with the given name, and parent and child columns to the collection.

5. Adds a DataRelation with the given name, and arrays of parent and child columns to the collection.

6. Adds a DataRelation with the given name, parent and child columns, and whether to create a constraint.

7. Adds a DataRelation with the given name, arrays of parent and child columns, and whether to create a constraint.


Example

The following example adds a new DataRelation to the collection.

NOTE: This example shows how to use one of the overloaded versions of Add. For other examples that may be available, see the individual overload topics.

ds.Relations.Add ( "categoryId", 
   ds.Tables [ 0 ].Columns [ "CategoryID" ], 
   ds.Tables [ 1 ].Columns [ "CategoryID" ] );
  C# VB

See Also

DataRelationCollection Members Skip Navigation Links




Home
Suggested Reading


Previous page Back to top Next page

© 2000-2010 Rey Nuñez All rights reserved.

If you have any question, comment or suggestion
about this site, please send us a note

You can help support asp.net.ph