asp.net.ph

ForeignKeyConstraint.Columns Property

ForeignKeyConstraint Class   System.Data Namespace


Returns the child columns of this constraint.

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

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

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

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

Property Value

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

Example

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

[ VB ] 
Private GetColumns ( )
   Dim Cols ( ) 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
        cols = dr.RelatedColumns
           For i = 0 To Ubound ( cols )
              Response.Write ( Cols ( i ).ColumnName
           Next i
      End If
   Next
End Sub
   
See Also

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