标签:
序列
procedure TForm1.Button2Click(Sender: TObject);
var
msgpack: TQMsgPack;
begin
msgpack := TQMsgPack.Create;
try
msgpack.AsVariant := cds.Data;
if SaveDialog1.Execute then
begin
msgpack.SaveToFile(SaveDialog1.FileName);
end;
finally
FreeAndNil(msgpack);
end;
end;
还原
procedure TForm1.Button3Click(Sender: TObject);
var
msgpack: TQMsgPack;
begin
msgpack := TQMsgPack.Create;
try
if OpenDialog1.Execute() then
begin
msgpack.LoadFromFile(OpenDialog1.FileName);
cds.Close;
cds.Data := msgpack.AsVariant;
end;
finally
FreeAndNil(msgpack);
end;
end;
TQMsgPack序列还原clientdataset.data
标签:
原文地址:http://www.cnblogs.com/hnxxcxg/p/4331637.html