Export (0) Print
Expand All

ForeignKeyConstraint.Table Property

Gets the child table of this constraint.

[Visual Basic]
Overrides Public ReadOnly Property Table As DataTable
[C#]
public override DataTable Table {get;}
[C++]
public: __property DataTable* get_Table();
[JScript]
public override function get Table() : DataTable;

Property Value

A DataTable that is the child table in the constraint.

Example

[Visual Basic] 
Private Sub GetRelatedTables()
   Dim dr As DataRelation
   Dim t As DataTable
   
   ' Get the DataRelation from a DataSet.
   For Each dr In DataSet1.Relations
      If dr.GetType.ToString = "System.Data.ForeignKeyConstraint" Then
         t = dr.ParentTable
         Console.WriteLine(t.TableName, t.Columns.Count, t.Rows.Count)
      End If
   Next
End Sub

[C#, C++, JScript] No example is available for C#, C++, or JScript. To view a Visual Basic example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

ForeignKeyConstraint Class | ForeignKeyConstraint Members | System.Data Namespace | Columns | DataTable | RelatedTable | RelatedColumns

Show:
© 2014 Microsoft