Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

I've 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.

 

 

I've tried the following and many other combinations but none seem to work.

con.Open
cmd.CommandText = sqlStr1
da.Fill(ds, "dsTable1")

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

 

I don't need any interoperability between the two tables. I'm 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

Edited by TedN

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...