I have got My 1st DataTable TableA from Database which is given below

Item       Place
  -------------------------
      ItemA      PlaceA
      ItemC      PlaceC

I have got My 2nd DataTable TableB from Database which is given below

Item       Status
---------------------------
      ItemB     
      ItemC      Complete

The New Data Table will Look Like Below

Item      Place       Status
-------------------------------------
     ItemA     PlaceA  
     ItemB                 Complete
     ItemC     PlaceC      Complete

I am Using the following Code

Dim DT_A As DataTable
        DT_A = TableA.Copy()

        Dim DT_B As DataTable
        DT_B = TableB.Copy()

        DT_A.Merge(DT_B)

I am Getting Like below

Item      Place       Status
-------------------------------------
     ItemA     PlaceA  
     ItemB                 Complete
     ItemC     PlaceC      
     ItemC                 Complete

But I am not Getting the Like Below Data Table

Item      Place       Status
-------------------------------------
     ItemA     PlaceA  
     ItemB                 Complete
     ItemC     PlaceC      Complete

Please Help.What is the Main Problem and Whats the Solution

Thanks in Advance

Recommended Answers

All 2 Replies

The JOIN should be part of your SQL Query

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.