开发者

DataSet.Copy vs Dataset.Clone

开发者 https://www.devze.com 2022-12-31 10:46 出处:网络
Can someone explain me DataSet.Copy()vsDataset.Clone() Also let me know some开发者_JAVA百科 scenario\'s where we can use these Clone will create a new, empty DataSet with the same schema (tables and c

Can someone explain me DataSet.Copy() vs Dataset.Clone() Also let me know some开发者_JAVA百科 scenario's where we can use these


Clone will create a new, empty DataSet with the same schema (tables and columns) as the old one. The new DataSet will not have any data.

Copy does the same thing, but also copies the rows in the tables.


Clone copies the only the structure of the dataset where as Copy copies the data as well.

http://www.dotnetspider.com/forum/ViewForum.aspx?ForumId=52327


The Clone() method creates a new DataSet with the same structure. The Copy() method does too, and copies the data.


DataSet.Copy copies both the structure (tables, relations etc) and the data.

DataSet.Clone copies only the structure of the DataSet.


.Clone returns a data set with exactly the same schema but without any rows, .Copy returns both the schema and the rows.

0

精彩评论

暂无评论...
验证码 换一张
取 消