asp.net.ph

ForeignKeyConstraint.RelatedTable Property

ForeignKeyConstraint Class   System.Data Namespace


Returns the parent table of this constraint.

[ VB ]
Overridable Public ReadOnly Property RelatedTable As DataTable

[ C# ]
public DataTable RelatedTable {virtual get;}

[ C++ ]
public: __property virtual DataTable* get_RelatedTable ( );

[ JScript ]
public function get RelatedTable ( ) : DataTable

Property Value

The parent DataTable of this constraint.

Example

The following example gets the related DataTable for each ForeignKeyConstraint in a DataSet.

[ VB ] 
Private GetRelatedTables ( )
   Dim dr As DataRelation
   Dim t As DataTable

   ' get the DataRelation from a DataSet.
   For Each dr In myDataSet.Relations
      If dr.GetType.ToString = "System.Data.ForeignKeyConstraint" Then
        t = dr.RelatedTable
        Response.Write ( t.TableName, t.Columns.Count, t.Rows.Count
     End If
     Next
End
See Also

ForeignKeyConstraint Members   Columns   DataTable   Table   RelatedColumns 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