Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1021421
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T11:18:31+00:00 2026-05-16T11:18:31+00:00

hai friends I am one dataset like this ds like three columns this: tblkey

  • 0

hai friends

I am one dataset like this ds like three columns this:

tblkey Empkey Empname

T101 E10 Natraj
T102 E11 Siva
T103 E14 ganesh

I am having another dataset ds1 only two columns like this:

Empkey Empname
E10 karthi
E11 thriu
E13 maran

i waant merge the dataset and check the values while checking if ds is not having E13 it should bind and show the result like this ds

tblkey Empkey Empname

T101 E10 Natraj
T102 E11 Siva
T103 E14 ganesh
E13 maran
here ‘tblkey’ comes empty
how to do:

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T11:18:31+00:00Added an answer on May 16, 2026 at 11:18 am

    To replicate your example entirely:

    DataSet ds1 = new DataSet();
    DataSet ds2 = new DataSet();
    
    ds1.Tables.Add(new DataTable());
    ds2.Tables.Add(new DataTable());
    
    ds1.Tables[0].Columns.Add("tblkey");
    ds1.Tables[0].Columns.Add("empkey");
    ds1.Tables[0].Columns.Add("empname");
    
    ds2.Tables[0].Columns.Add("empkey");
    ds2.Tables[0].Columns.Add("empname");
    
    ds1.Tables[0].Rows.Add("T101", "E10", "Natraj");
    ds1.Tables[0].Rows.Add("T102", "E11", "Siva");
    ds1.Tables[0].Rows.Add("T103", "E14", "ganesh");
    
    ds2.Tables[0].Rows.Add("E10", "karthi");
    ds2.Tables[0].Rows.Add("E11", "thriu");
    ds2.Tables[0].Rows.Add("E13", "maran");
    
    // primary keys must be set in order for the merge to work
    ds1.Tables[0].PrimaryKey = new DataColumn[] { ds1.Tables[0].Columns["empkey"] };
    ds2.Tables[0].PrimaryKey = new DataColumn[] { ds2.Tables[0].Columns["empkey"] };
    
    // this is the critical line
    ds1.Merge(ds2, true, MissingSchemaAction.Add);
    

    Adding the missing schema (in this case, the tblkey column) is achieved by setting the third parameter correctly.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

hai friends i am having the table like this TBLKEY EMPKEY EMPNAME ----------- ------------------------------
hai Friends I am using this coding for validating the emailID online through webservice
public enum myEnum { VAL1(10), VAL2(20), VAL3(hai) { public Object getValue() { return this.strVal;
I have used this in my HTML: <q> Hai How r u </q> Which
Hai Friends., Im doing a project on Airline Reservation.In my project i have a
hai friends In my application i want to send sms using nokia 3310c mobile
Hai Guys, Like DataAccessApplicationBlock for .net with sql server,Is there any thing for MySql
Hai Friends I am using webservice for validating the Email in the Online Its
hai friends I am using a file upload control to upload the files if
Hai friends, I have a doubt now, Has Android really replaced J2ME and WML?

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.