Multi-Table DataSets and Relations
Up until now, the examples have demonstrated DataSets using a single table. DataSets also support multiple tables. Therefore, you are able to fill a DataSet object with rows from multiple tables in the database.
Essentially, a DataAdapter is responsible for populating a DataSet from a specific table in the database. If you create a DataSet for each table that you want to populate a DataSet with, you can then use each DataAdapter object to populate the DataSet object. This results in populating a DataSet with many types of records. The number of different types of records depends on the number of adapters you use to populate a DataSet.
Remember in our earlier examples where we used the Tables property on a DataSet? ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access