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

dataset

P: n/a
Hi There,

How can I extract a DataSet? I recieve the dataset from a
server. I created a DataTable like this:
DataSet ds = remoteInterface.retrieveUser(userBankId);
DataTable dtBankStuff = ds.Tables["Customers"];
is this the right way?

I would like to extract only the columns to textboxes,
since I will only receive one row.

I tried this:
textBox15.Text = dtBankStuff.Columns[0].ToString();
but it doesn't work. Has anyone please a suggestion?

Thanks a lot

Chris
Jul 19 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Hi Chris!

If all you want to do is to get one column from the dataset then you could
do it this way.

DataSet ds = remoteInterface.retrieveUser(userBankId);

textBox15.Text = ds.Tables["Customers"].Rows[0]["ColumnName"].ToString();

//you can replace ColumnName with the index of the column like this
textBox15.Text = ds.Tables["Customers"].Rows[0][0].ToString();

I hope this helps you out.

//Mikael

"chris" <ch*********@hotmail.com> wrote in message
news:0f****************************@phx.gbl...
Hi There,

How can I extract a DataSet? I recieve the dataset from a
server. I created a DataTable like this:
DataSet ds = remoteInterface.retrieveUser(userBankId);
DataTable dtBankStuff = ds.Tables["Customers"];
is this the right way?

I would like to extract only the columns to textboxes,
since I will only receive one row.

I tried this:
textBox15.Text = dtBankStuff.Columns[0].ToString();
but it doesn't work. Has anyone please a suggestion?

Thanks a lot

Chris

Jul 19 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.