FDMemTable data copy

Dec 24, 2016 22:08 · 29 words · 1 minute read

防止添加重复数据

FDMemTable2.First;
  while  not FDMemTable2.Eof do
  begin
    if not FDMemTable1.Locate('F_AUTOID',FDMemTable2.FieldByName('F_AUTOID').AsString,[] ) then
       FDMemTable1.CopyRecord(FDMemTable2);
    FDMemTable2.Next;
  end;

完全转移数据

FDMEMTABLE.AppendData(FDMEMTABLE.DATA);