您的位置:首页 > Web前端 > JavaScript

firedac的数据序列和还原单元(Data.FireDACJSONReflect.pas)之拷贝FIREDAC数据集

2015-12-15 14:55 495 查看
使用流做中转

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;
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: