I am unsure on how to retrieve data from tables 2 tables
that are related through a relationship table....
This seems to confuse me...!
TableOne
--------
TableOneID
TableOneDesc
TableTwo
--------
TableTwoID
TableTwoDesc
TableOne_TableTwo_Relationship
------------------------------
TableOne_TableTwo_RelID
TableOneID
TableTwoID
I have related TableOne to TableOne_TableTwo_Relationship.
Then I have related TableTwo to
TableOne_TableTwo_Relationship.
DataRelation TableOneToRelTable = dsTest.Relations.Add("T1ToRel", TableOne.Columns["TableOneID"],
TableOne_TableTwo_Relationship.Columns["TableOneID"]);
DataRelation TableTwoToRelTable = dsTest.Relations.Add("T2ToRel",TableTwo.Columns["TableTwoID"],
TableOne_TableTwo_Relationship.Columns["TableTwoID"]);
I am unsure on how to traverse though the set
relationships to retrieve data. ie) I want to print out
all TableTwoDesc that have been related to a specific
TableOneID.
Thanks for your help,
niv
that are related through a relationship table....
This seems to confuse me...!
TableOne
--------
TableOneID
TableOneDesc
TableTwo
--------
TableTwoID
TableTwoDesc
TableOne_TableTwo_Relationship
------------------------------
TableOne_TableTwo_RelID
TableOneID
TableTwoID
I have related TableOne to TableOne_TableTwo_Relationship.
Then I have related TableTwo to
TableOne_TableTwo_Relationship.
DataRelation TableOneToRelTable = dsTest.Relations.Add("T1ToRel", TableOne.Columns["TableOneID"],
TableOne_TableTwo_Relationship.Columns["TableOneID"]);
DataRelation TableTwoToRelTable = dsTest.Relations.Add("T2ToRel",TableTwo.Columns["TableTwoID"],
TableOne_TableTwo_Relationship.Columns["TableTwoID"]);
I am unsure on how to traverse though the set
relationships to retrieve data. ie) I want to print out
all TableTwoDesc that have been related to a specific
TableOneID.
Thanks for your help,
niv