Multiple tables in dataset

gqstud79

Member
Joined
Sep 28, 2002
Messages
11
Can anyone tell me how to add multiple tables to a dataset? Im having all kinds of problems trying to figure it out. Thanks
 
Last edited by a moderator:
First you need to create a new table to add, then all you need to
do is add that table to the DataSets Tables collection, using its
add method.

Here ds is the dataset:
Code:
Dim dtMoo As New DataTable("Moo")

ds.Tables.Add(dtMoo)

Then dtMoo will be one of the DataSets tables, and you can
access it by an index, its name, or the DataTable instance itself (dtMoo).

You can add as more tables to the DS using this same method.

[edit]Fixed up some stuff[/edit]
 
Back
Top