开发者

DataSet.Copy vs Dataset.Clone

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜