miku

Hi Guys,

I would like to know how to merge two datarow. I have following scenario.

I have my database with the following table called user.

ID, Name etc..

I have loaded the table. Now I received updates on this table from a webservice. The web service basically returns me everything and does not tell me if anything has changed. I load both the user table in db and the the user table from webservice in two separate datasets.

I would like to basically merge the changes to the database and update only those rows that have changed. how can i do that. I wouldn't want to compare each column of each row.

Regards,
AJ


Re: Visual C# Language DataRow Merge

Figo Fei - MSFT

Hi, miku

Substitude the new dataset with the old one. Otherwise, merge them, here is the refereces : http://msdn2.microsoft.com/en-us/library/aszytsd8.aspx

and info about merge method of dataset : http://msdn2.microsoft.com/en-us/library/system.data.dataset.merge.aspx

Hope it helps.

Thank you