C# winforms: DataSet with multiple levels of related tables
- by Jake
Hi,
I am trying to use DataSet and DataAdapter to "filter" and "navigate" DataRows in DataTables.
THE SITUATION:
I have multiple logical objects, e.g. Car, Door and Hinge.
I am loading a Form which will display complete Car information including each Door and their respective Hinges. In this senario, The form should display info for 1 car, 4 doors and 2 hinges for each door.
Is it possible to use a SINGLE DataSet to navigate this Data? i.e. 1 DataRow in car_table, 4 DataRow in door_table and 8 DataRow in hinge_table, and still be able to navigate correctly between the different object and their relations? AND, able to DataAdapter.Update() easily?
I have read about DataRelation but don't really understand how to use it. Not sure if it is the correct direction for my problem.
Appreciate any advise. Thanks!