FDMemtable如何增加一条自身复制的记录
procedure TFrame_Bill.CopyARecord; var lAFDmemtable : TFDMemTable; begin {$REGION '增加一条复制的记录'} try lAFDmemtable := TFDMemTable.Create(nil); lAFDmemtable.CopyDataSet(fdmtbl_Detail,[coStructure]);//copy 结构 lAFDmemtable.Append; lAFDmemtable.CopyRecord(fdmtbl_Detail); lAFDmemtable.fieldbyName('CTD_Key').Value := IdGenerator.NextId().ToString; fdmtbl_Detail.CopyDataSet(lAFDmemtable,[coAppend]);//增加一条记录 finally lAFDmemtable.FreeOnRelease; end; changeStateImage; {$ENDREGION} end;