Filling Two Tables In A Dataset

TedN

Active member
Joined
Sep 25, 2006
Messages
35
Ive created two query strings to get data from various tables in a database.

I would like to fill two table tables in a dataset with the data from each query string, e.g.

sqlStr1 data into dsTable1
sqlStr2 data into dsTable2.


Ive tried the following and many other combinations but none seem to work.
Code:
con.Open
cmd.CommandText = sqlStr1
da.Fill(ds, "dsTable1")

cmd.CommandText = sqlStr2
da.Fill(ds, "dsTable2")
con.Close

I dont need any interoperability between the two tables. Im placing the data in separate tables simply for the sake of clarity.

I would also prefer not to combine the two query strings.


Thanks,
Ted
 
Last edited by a moderator:
Back
Top