Dataset Clone & Copy

Posted by Doga under ASP.NET on 8/23/2012 | Points: 10 | Views : 1214 | Status : [Member] | Replies : 2
If datasaet D1 contains 10 records

How many records will contain the
D1.Copy() =
D1.Clone() =

Also if i remove the 2 records what will be output




Responses

Posted by: Gopesh9 on: 8/23/2012 [Member] Starter | Points: 25

Up
0
Down
DataSet.Clone() - It only copies the structure but doesnot Copies the Data;
Dataset.Copy() - It copies both Structure and data..
So when you do--
D1.Copy() = the new dataset have both the structures and data of D1
D1.Clone() = Here in this case there will be no data in the new DataSet.



G. S.
.Net Developer

Doga, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Srilu.Nayini577 on: 8/23/2012 [Member] Starter | Points: 25

Up
0
Down
Yes its true.

Clone only copies structure of table.But copy copies both data and structure.

Thank you,

SRILATHA
.Net Developer

Doga, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response