asp.net.ph

ForeignKeyConstraint.RelatedColumns Property

ForeignKeyConstraint Class   System.Data Namespace


The parent columns of this constraint.

[ VB ]
Overridable Public ReadOnly Property RelatedColumns As DataColumn ( )

[ C# ]
public DataColumn [ ] RelatedColumns {virtual get;}

[ C++ ]
public: __property virtual DataColumn* get_RelatedColumns ( );

[ JScript ]
public function get RelatedColumns ( ) : DataColumn [ ]

Property Value

An array of DataColumn objects representing the parent columns of the constraint.

Example

The following example returns an array of DataColumn objects through the RelatedColumns property.

[ VB ] 
Private GetRelatedColumns ( )
   Dim relCols ( ) As DataColumn
   Dim dr As DataRelation
   Dim i As Integer 
   ' get the DataRelation from a DataSet.
   For Each dr In myDataSet.Relations
      If dr.GetType.ToString = "System.Data.ForeignKeyConstraint" Then
        relCols = dr.RelatedColumns
           For i = 0 To Ubound ( relCols )
              Response.Write ( relCols ( i ).ColumnName
           Next i
      End If
   Next
End Sub
See Also

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