Delphi ClientDataSet复制记录
2021-06-16 05:04
标签:false 复制 ldd dde data edit created set sign 数据源记录集:ClientDataSetSource;目标记录集:ClientDataSetCopy 1)复制一条记录。 ClientDataSetCopy.Close; //复制字段定义 //复制当前记录行 2)复制所有记录。 ClientDataSetCopy.Close; Delphi ClientDataSet复制记录 标签:false 复制 ldd dde data edit created set sign 原文地址:https://www.cnblogs.com/jijm123/p/10351797.html
ClientDataSetCopy.Fields.Clear;
ClientDataSetCopy.FieldDefs.Clear;
ClientDataSetCopy.FieldDefs.Assign( ClientDataSetSource.FieldDefs);
ClientDataSetCopy.CreateDataSet;
ClientDataSetCopy.Edit; //Append;
ClientDataSetCopy.CopyFields(cds1);
ClientDataSetCopy.Fields.Clear;
ClientDataSetCopy.AppendData(ClientDataSetSource.Data,False);