asp.net.ph

DataRelation.DataSet Property

System.Data Namespace   DataRelation Class


Returns the DataSet in which the DataRelation belongs.

Syntax


Script [ DataSet variable = ] DataRelation.DataSet

Property Value


variable A DataSet in which the DataRelation belongs.

The property is read only with no default value.

Remarks

The DataRelation objects in a DataRelationCollection associated with a DataSet is accessed through the DataSet.Relations property.

Example

The following example gets the DataSet of a DataRelation.

private void GetRelDataSet ( myRelation As DataRelation )
   // get the DataSet of the passed in DataRelation.
   DataSet ds = myRelation.DataSet;
   // print the table names of each table in the DataSet.
   DataTable tbl;
   foreach ( tbl in ds.Tables ) {
      Response.Write ( tbl.TableName );
   }
}
  C# VB

See Also

DataRelation Members   DataSet   Relations   DataRelationCollection 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