Update rows in datatable

T

Tommy

Is it possible to perform some type of update on the databtable contained in
my dataset without iterating through each row individually? Some type of sql
type update would be great.

I am using it as a temporary store to iterate through some records and
display info to the users.. I loop through the datatable updating the data
on the server based on another field and want to update the data in the
datatable to show that the server has been modified so i can skip those
records if a previous update took care of them.

I know.. first thought is to requery the server but i can't do that... it
takes too much time and i need this to be very fast.
 
W

W.G. Ryan eMVP

Calling the .Update method of the dataadapter loops through the rows behind
the scenes (there's a killer BulkUpdate functionality in the 2.0 Framework
btw). If you just call update, it will update each of the rows. If you
don't want to use Update for the whole table, you can use DataTable.Select
for instance, and based on some condition just pass the Row array to the
Update method.

HTH,

bill
 
V

Val Mazur

Hi,

No, there is no such capabilities in a current version. You would need to
loop through the rows to update them one-by-one
 

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

Top