C# winforms: DataSet with multiple levels of related tables
Posted
by
Jake
on Stack Overflow
See other posts from Stack Overflow
or by Jake
Published on 2011-01-09T09:00:08Z
Indexed on
2011/01/09
9:53 UTC
Read the original article
Hit count: 379
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!
© Stack Overflow or respective owner