Change/assign a value to dataset

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,
Would anyone tell me how to change a value of a column in a dataset?
Something like this:

ds.Tables(0).Rows(0)("Column1") = 1

Tia,
Roy
 
Hi Scott,
But what happens if ds doesn't have any records in its table. How can I add
a blank row and then update the columns values with my default values?
Thanks again
 
Roy,

Strange I thought that I had sent you an answer.
ds.Tables(0).Rows(0)("Column1") = 1
It was like this.

This will set in the Item "Column1" from the first datarow from the first
Table when that is an integer field an 1.

Because that I saw your next question on which are probably hundred answers,
one of them.

\\\
ds.Tables(0).Rows.Add(ds.Tables(0).NewRow)
///

I hope this helps,

Cor
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Back
Top