TMSQuery.SaveToStream/LoadFromStream the entire data set
An optimized version of this (maybe without the need to go to/from dataset to make it go faster)
var
query: TMSQuery;
VirtualTable: TVirtualTable;
begin
query := db.CreateMSQuery( ); //returns TMSQuery
query.SQL.Text := 'select * from [table]';
query.open;
result := binary.create;
VirtualTable := TVirtualTable.Create(nil);
VirtualTable.Assign(query);
VirtualTable.saveToStream( result );
VirtualTable.free;
query.free;
end;
4
votes
Anonymous
shared this idea