May 2002
Beginner
408 pages
9h 10m
English
The DataSet contains a collection of DataRelation objects named, appropriately enough, DataRelationCollection. This collection stores all DataRelations for the DataTables in your DataSet. There's no practical limit to the number of relationships you can add to a DataSet.
Adding a relationship between two DataTables is straightforward. You can simply add a new DataRelation object to the Relations collection of your DataSet as in Listing 4.4. The first argument to the Add() method is the name of the relationship. The second argument contains the parent DataColumn. The third argument contains the child DataColumn of the relationship.
The parent is defined as the column ... |
Read now
Unlock full access