Click here to Skip to main content
15,912,400 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Respected Sir..
I have 4 datasets
VB
Dim ds_Purchase As New DataSet
Dim ds_Sale As New DataSet
Dim ds_OpeningStock As New DataSet
Dim ds_ClosingStock As New DataSet
Dim ds_Final As New DataSet

each dataset having table with same column
ds_Purchase.table(0)
XML
SID   ItemName  Size    Unit      Qnty
---------------------------------------
120     abc        10      kg        10
130     pqr        20      kg        20
140     lmn        25      gm        40

ds_Sale.table(0)
XML
SID   ItemName  Size    Unit      Qnty
--------------------------------------- 
120     abc        10      kg        10
130     pqr        20      kg        50
150     HIJ        150     gm        60

likewise for all datasets
i want union of all dataset's table with addition of respective quantity into new dataset table
ds_Final.table(0)
ex.
XML
ds_Final.table(0)
SID   ItemName  Size    Unit      Qnty
---------------------------------------
120     abc        10      kg       20 (10+10)
130     pqr        20      kg       70 (20+50)
140     lmn        25      gm       40 (0+40) 
150     HIJ        150     gm       60 (0+60)


I have tried but its takes lots of time to execute since i have to check each and every rows to add quantity
Can we do it by another way ?
Please Help me..
Thank you.
Posted
Comments
Try with LINQ.
Maciej Los 2-Nov-13 8:31am    
What have you tried so far?

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900