Click here to Skip to main content
14,668,823 members
Rate this:
Please Sign up or sign in to vote.
See more:
I have 2 datatables each containing 100 datarows each. in these 2 datatables 20 rows are common (exist in both data tables). When i merge these 2 datatables how i can eleminate the duplicate datarows without effecting the performance because the datarows in the datatables might increase in future.

thanks in advance
Posted

Rate this:
Please Sign up or sign in to vote.

Solution 2

try like this
DataSet ds=new DataSet();
ds.Tables.Add(Table1);
ds.Tables.Add(Table2);
ds.Relations.Add("TheRelation", Table1.Columns["a"], Table2.Columns["a"]);
Table2.Columns.Add("b", GetType(System.String), "Parent.b")

and see below link you may get an idea
http://stackoverflow.com/questions/1262383/merging-2-data-tables-in-vb-net[^]
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100