使用流做中转
procedure CopyDataSet(const ASource, ADest: TFDAdaptedDataSet);
var
LStream: TStream;
begin
LStream := TMemoryStream.Create;
try
ASource.SaveToStream(LStream, TFDStorageFormat.sfBinary);
LStream.Seek(0, TSeekOrigin.soBeginning);
ADest.LoadFromStream(LStream, TFDStorageFormat.sfBinary);
finally
LStream.Free;
end;
end;