Hi Friends
Differences between dataset.clone and dataset.copy?
Differences between dataset.clone and dataset.copy?
2 Answers
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 attend5days leftRegister
VulpesRank #55 · 29.2K reputationPosted Mar 2, 2012, 1:17 PM EST
The Copy() method copies both the structure and the data.
By structure, I mean the schema, relations and constraints of all DataTables in the DataSet.
Jignesh TrivediRank #16 · 50.3K reputationPosted Mar 4, 2012, 5:36 PM EST
DataSet.Copy copies both the structure (tables, relations etc) and the data.In other word the Copy method of the DataSet class copies both the structure and data of a DataSet object. It returns a new DataSet object having the same structure including all DataTable schemas, relations, and constraints and data as the existing DataSet object.
DataSet.Clone copies only the structure of the DataSet.In other word the Clone method of the DataSet class copies only the schema of a DataSet object. It returns a new DataSet object that has the same schema as the existing DataSet object, including all DataTable schemas, relations, and constraints. It does not copy any data from the existing DataSet object into the new DataSet.
hope this help.