Copy ClientDataSet with Nested Datasets help needed


2006-04-13 08:10:39 AM
off-topic10
I have a clientdataset with one nested dataset. I am trying to copy
this to another client dataset. The copy works fine, but the ordering
of the copy result is getting changed.
Here is an example:
CDS1 contains :
ID NAME NESTEDDATASET
--- ---- -------------
1 Name1 DATASET
The nested dataset contains
NESTEDDATASET
-----
Z1
Z2
If I copy this dataset to CDS2 I get an exact copy
(CDS2.Data:= CDS1.Data;) Everything works great at this point
Now, I change the original nested dataset (edit the first value) as
follows:
NESTEDDATASET
---------
aaa1
Z2
Now if I copy; the resulting nested dataset has a different order than
the copied dataset
COPIEDNESTEDDATASET
------
Z2
aaa1
Does anyone know why this is happening? I have tried using the
MergeChangeLog to finalize any changes on the source dataset. I don't
have any indexes defined on any of the datasets. It appears that when
the copy occurs, the resulting dataset gets the data in the CHANGE
ORDER of the source dataset which is not what I want.
Any help would be appreciated.
--