Update rows in datatable

  • Thread starter Thread starter Tommy
  • Start date Start date
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.
 
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
 
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
 
Back
Top