Avoid duplicate copy of datasource
In Windows application, copy of datasource is created while I add new table to it. How I can avoid it.
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
naura paxRank #2,843 · 502 reputationPosted Oct 28, 2009, 9:18 PM EDT
There is another method called merge. eg:
DataSet ds2 = new DataSet(); ds2.Merge(ds1.Tables[0].Rows,true);//ds1 is filled //and retrieved from database. // Second parameter is preserve changes.But with this function dataset's orignial structure may get overriden, use true for second parameter and make sure table structure of rows passed matches that of original.