|
-
Nov 14th, 2011, 12:45 PM
#2
Re: Quick way to update datatable
There may or may not be a better way to do this. At first glance, it looks like it would be better to only update the records that are new or changed, but that may not be efficient. After all, for this to work, you would have to know which records needed to be updated. If you have some easy way to know this, and the number is small, then just updating those would be simpler. If you have to check each record to determine whether or not it has changed, then the cost of checking will outweigh any possible gain.
What isn't clear to me is why you need to do this in the first place. You are getting a datatable back from the service, why can't you replace the existing with this new table. If all you have to do is add a column and populate it, this is probably still going to be faster than copying over all the records.
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|