How to Merge 3 DataTables into Single DataTable In C# Windows Application ?

Posted by Kasani007 under C# on 1/8/2015 | Points: 10 | Views : 4556 | Status : [Member] | Replies : 2
How to Merge 3 DataTables into Single DataTable In C# Windows Application ?




Responses

Posted by: vishalneeraj-24503 on: 1/8/2015 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Hi,Try this:-
DataTable dt_new = new DataTable();
dt_new.Merge(dt_first);
dt_new.Merge(dt_second);
dt_new.Merge(dt_third);


Kasani007, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: vishalneeraj-24503 on: 1/8/2015 [Member] [MVP] Platinum | Points: 25

Up
0
Down
Hi,
Make sure all your datatables have same column with same datatypes.

Kasani007, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response