Hi all,
Actually it's a very good question.
If you don't affraid of performance issues, the best solution is to use the
merge operation.
ds1.Merge(ds2) or ds1.Merge(datatable1)
But if a given table doesn't exist in the destination's ds this code
actually will create a new instance of the datatable1 using DataTable.Copy()
operation and when will add it into your destination's ds.
One can think of another solution. Suppose I could detach the desired
DataTable from the source DS and attach it to the destination's DS. I will
save using this approach the DataTable.Copy() operation which is very
expensive and will merge my data properly,
Does anybody know how to accomplish that in .NET ?
Thanks,
Uri