I want to append a record in a TClientDataSet based on another record (in this same TClientDataSet). Problem is that i can't access another record in the TClientDataSet because the cursor is pointed to the row i'm appending. And i can't find another way to access the other records in the same TClientDataset.
Of course i can use an extra TClientDataSet, copy some stuff and solve it that way, but i don't like that solution.
So is there a way to access the rows/records in a TClientDataset besides moving the cursor?
The only way to do this would be to fully dissect the ClientDataSet.Data property content.
Which means you will need to write most of the ClientDataSet functionality yourself.
It is much easier to clone the cursor into a new ClientDataSet, then use that cursor to browse through your records. Then you can use your old ClientDataSet to do the appends.
This article explains about cloning cursors: Cloning ClientDatSet Cursors
--jeroen
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With