To copy the data from another dataset at design time, right click the client dataset and choose Assign Local Data. A dialog appears listing all the datasets available in your project. Select the one whose data and structure you want to copy and choose OK. When you copy the source dataset, your client dataset is automatically activated.设计时就是在cds上点右键然后选assign local data就会看到当前project中可用的其它cds,选就行了运行时 ClientDataSet1.Data := ClientDataSet2.Data; 还可以用CloneCursor : When you copy the Data property of another client dataset, you copy the change log as well, but the copy does not reflect any filters or ranges that have been applied. To include filters or ranges, you must clone the source dataset's cursor instead.
记不清XXX是什么了,你可以自己试一下
**** 深圳的DELPHI爱好者聚会通知! ****详情请看:
http://www.delphibbs.com/delphibbs/dispq.asp?LID=1619353
ClientDataSet1.Data := ClientDataSet2.Data;
还可以用CloneCursor :
When you copy the Data property of another client dataset, you copy the change log as well, but the copy does not reflect any filters or ranges that have been applied. To include filters or ranges, you must clone the source dataset's cursor instead.