Skip to Content
Microsoft® Visual C#® .NET 2003 Kick Start
book

Microsoft® Visual C#® .NET 2003 Kick Start

by Steven Holzner
June 2003
Intermediate to advanced
624 pages
12h 41m
English
Sams
Content preview from Microsoft® Visual C#® .NET 2003 Kick Start

Using Multiple Tables in a Single Dataset

So far, the datasets we've used only held a single table of data, but a dataset can contain several tables at once. To see how this works, take a look at the Ch09_03 example in the code for this book. This example uses two SqlDataAdapter controls, sqlDataAdapter1, connected to the authors table in the pubs database, and sqlDataAdapter2, connected to the titleauthor table in the pubs database (in this example, we'll select all fields of both these tables). When you create a dataset using these data adapters, you can add data from both adapters into a single dataset.

To see how this works, create these data adapter objects now and select Data, Generate Dataset. You can add both data tables to a single 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.
Start your free trial

You might also like

Microsoft® .NET Kick Start

Microsoft® .NET Kick Start

Hitesh Seth

Publisher Resources

ISBN: 0672325470Purchase book