[fpc-pascal] Coping a DataSet
Michael Van Canneyt
michael at freepascal.org
Mon Dec 3 18:32:12 CET 2012
On Mon, 3 Dec 2012, Marcos Douglas wrote:
> On Mon, Dec 3, 2012 at 2:03 PM, <michael.vancanneyt at wisa.be> wrote:
>>
>>
>> On Mon, 3 Dec 2012, silvioprog wrote:
>>
>>> Guys,
>>>
>>> Is "Assign" method implemented for dataset in FPC?
>>
>>
>> No, it is not. Datasets differ wildly in how they access and store data.
>>
>> Michael.
>
> But all descendents use TFieds classes so, why not?
> I can use a loop and the Append method, but this is not faster.
Speed is not the issue.
There is simply no way to tell what this action will do behind the scenes.
You might for example generate a huge amount of queries, which will presumably
all fail, since the records already exist in the database.
Then: Should the transaction be copied ? etc. etc. etc.
In short: it is not implemented, and I doubt it every will be, at least at the TDataset level.
When using a pure TBufDataset, probably it is possible to copy the data package
(much like TClientDataset in Delphi), but this would need to be implemented.
Michael.
More information about the fpc-pascal
mailing list