Jump to content

Updating data in a dataset - help required!


Recommended Posts

Guest Mike Wagstaff
Posted

Hi all,

I'm using the "select" property to extract specific rows from a table within a dataset. Getting at the information is fine. The problem is, however, I'm not sure how to go about updating the data.

For example, say I use the following line of code to retrieve only the records I'm interested in...

Dim drFoundRows As DataRow() = dsDataSet.Tables(0).Select("id = 5")

Now, if I wanted to update some data within the above record(s) (i.e. within the original table), what's the most efficient means of doing that?

I could create a for loop that iterates through all the rows looking for records that match my criteria, but ideally I'd like to be able to take advantage of the same "select" method I used to retrieve the data.

Is there perhaps a way of getting at the row index from the underlying table?

Any ideas?

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.