This documentation is archived and is not being maintained.

ForeignKeyConstraint.Table Property

Gets the child table of this constraint.

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

Property Value

A DataTable that is the child table in the constraint.


[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
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.


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