使用流做中转

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;

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案