O'Reilly logo

Visual Basic® .NET by Example by Bob Donald, Gabriel Oancea

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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? ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required