By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,693 Members | 1,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,693 IT Pros & Developers. It's quick & easy.

fill a dataset with several requests

P: n/a
Sam
Hi,
I'm trying to fill a dataset using two requests :

select column_name as column_name1, data_type as data_type1
from information_schema.columns
where table_name = 'table1'

and

select column_name as column_name2, data_type as data_type2
from information_schema.columns
where table_name = 'table2'

after the first request I fill my dataset like this :

myCommand = New SqlCommand(sql.ToString, con)
da.SelectCommand = myCommand
da.Fill(dsFields)

I don't know how to add two columns to my dataset and fill them with
the two fields selected by my second request.
The reason I want to do this is, I want to fill the first two columns
of a datagrid with the first two of the dataset using parameter
'table1', and to fill the last two columns of the datagrid with the
last two of the dataset filled with the second request (parameter
'table2)

It's quite tricky I find.
Can someone help ?
thx

Nov 21 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.