D
Declan
Is it possible to setup a datarelation for more than one level of
relationship?
i.e.
Grandfather
Father
Son
In other words I have a Master table (Grandfather). Each entry in the
master table can have multiple entries in its related table (Father).
Each entry in the Father table can have multiple related entrie in its
related table (Son)
' Add relation between Grandfather and Father
Dim rel1 As New DataRelation("DeedsNames", _
oDataSet.ReturnedDataSet.Tables("Deeds").Columns("ID"), _
oDataSet.ReturnedDataSet.Tables("NamedParties").Columns("DeedsID"))
oDataSet.ReturnedDataSet.Relations.Add(rel1)
' Add relation between Father and Son
Dim rel2 As New DataRelation("NamedPartiesRegister", _
oDataSet.ReturnedDataSet.Tables("NamedParties").Columns("ID"), _
oDataSet.ReturnedDataSet.Tables("NamedPartiesEvents").Columns("RelationID"))
oDataSet.ReturnedDataSet.Relations.Add(rel2)
These tables will be displayed in a grid. If the first GrandFather row is
selected the Father grid should show related items and similar for Father
and Son grids.
-dw
relationship?
i.e.
Grandfather
Father
Son
In other words I have a Master table (Grandfather). Each entry in the
master table can have multiple entries in its related table (Father).
Each entry in the Father table can have multiple related entrie in its
related table (Son)
' Add relation between Grandfather and Father
Dim rel1 As New DataRelation("DeedsNames", _
oDataSet.ReturnedDataSet.Tables("Deeds").Columns("ID"), _
oDataSet.ReturnedDataSet.Tables("NamedParties").Columns("DeedsID"))
oDataSet.ReturnedDataSet.Relations.Add(rel1)
' Add relation between Father and Son
Dim rel2 As New DataRelation("NamedPartiesRegister", _
oDataSet.ReturnedDataSet.Tables("NamedParties").Columns("ID"), _
oDataSet.ReturnedDataSet.Tables("NamedPartiesEvents").Columns("RelationID"))
oDataSet.ReturnedDataSet.Relations.Add(rel2)
These tables will be displayed in a grid. If the first GrandFather row is
selected the Father grid should show related items and similar for Father
and Son grids.
-dw