What's the difference between Dataset.clone and Dataset.copy?
Answers were Sorted based on User's Feedback
Answer / bhavesh chhatrala
Clone :- It only copies structure, does not copy data.
Copy :- Copies both Structure and data
| Is This Answer Correct ? | 71 Yes | 2 No |
Answer / satyambabu
dataset.Clone :- It only copies structure, does not copy
data.
dataset.Copy :- Copies both Structure and data
| Is This Answer Correct ? | 57 Yes | 2 No |
Answer / muzism
Shallow copy is when the address of the object is assigned
to another of the same type. If a change to one is made,
the change is apparent in both instances.
Deep copy is when the entire contents of the object are
copied from one object into another. Hence, there are two
autonomous instances of the object. If a change to one is
made, the change is confined to that object.
Dataset.clone() duplicates (only) the structure of an
dataset, with no data being duplicated.
Dataset.copy() performs a deep copy of the dataset
| Is This Answer Correct ? | 19 Yes | 8 No |
Answer / nitin
Dataset.clone method only copies structure while Copy
method copies structure as well as data also.
| Is This Answer Correct ? | 12 Yes | 1 No |
Answer / prudhvi
dataset.clone method copies the structure of the DataSet,
including all datatable schemas, relations, and constraints.
But it does not copy any data. Whereas, dataset.copy method
copies both the structure and data
| Is This Answer Correct ? | 5 Yes | 0 No |
Answer / anand r.b
DataSet.clone perform Shallow copy only strucature should
be copy not data
where as Datset.Copy perform Deepa copy it should copy
strucature with data
| Is This Answer Correct ? | 2 Yes | 1 No |
Answer / momo altawil
Clone() :cop only Structure and create new instance of the
obj.
copy() :cop the structure and Data without Create new
instance.
| Is This Answer Correct ? | 3 Yes | 2 No |
Answer / tahir
dataset.Clone or Deep Copy :- It only copies structure,
does not copy
data.
dataset.Copy or Shallow Copy :- Copies both Structure and
data
| Is This Answer Correct ? | 6 Yes | 6 No |
Answer / dasaradhi
Clone -- Creates another reference (Pointer) to the same
location.
Copy -- Creates two different references to two different
Address Spaces
DataSet dsOriginal = new DataSet();
DataSet dsClone = dsOriginal.Clone();
DataSet dsCopy = dsCopy.Copy();
What does this mean?
Well, here is the answer.
If you make changes to dsClone, they will reflect in
dsOriginal also. where as you do changes to dsCopy, the
changes will not reflect in dsOriginal.
| Is This Answer Correct ? | 1 Yes | 3 No |
What are the data providers used in ado.net
What do you know about ado.net's methods?
Name which operations can you not perform on an ado.net dataset?
What are the important features of ado.net 2.0?
can we create synonymn in ms access,sql server,my sql if so explain me with example
how can implement dropdownlist in particular of dataset when try to update?
How to insert multiple records in asp .net from Gridview to Sql Database with out using loop condition ?
What is the difference between typed and untyped dataset?
What is difference between Dataview and Datatable?
Define executenonquery?
What is the use of Dataview?
What is method to get XML and schema from Dataset? getXML() and get Schema ()
Visual Basic (800)
C Sharp (3816)
ASP.NET (3180)
VB.NET (461)
COM+ (79)
ADO.NET (717)
IIS (369)
MTS (11)
Crystal Reports (81)
BizTalk (89)
Dot Net (2435)
Exchange Server (362)
SharePoint (720)
WCF (340)
MS Office Microsoft (6963)
LINQ Language-Integrated Query (317)
WPF (371)
TypeScript (144)
Microsoft Related AllOther (311)