当前位置: 动力学知识库 > 问答 > 编程问答 >

delphi - How to add field to a cloned TClientDataset

问题描述:

I have

ClientDataSet1 > DataSetProvider1 > SqlDataSet1> sql = select * from customer

i add all fields at design time

than i copy the ClientDataSet1 rename it to ClientDataSet2

On DataModule create event i clone the cursor

ClientDataset2.CloneCursor(ClientDataset1, True);

so the cloned dataset has now all persistence fields defined in cds1

according to the answer in this question

i attempted to add extra field InternalCalc/LookupField to the cloned dataset

at design time but error occurred during the execution "Field not Found"

My question what is the correct way to add extra field that doesn't exist in

the master dataset nor in the database to a cloned TClientDataSet.

thank's ...

分享给朋友:
您可能感兴趣的文章:
随机阅读: