TDBAdvGrid.SaveToStream and Dataset.LoadFromStream

Hello,

I am trying to move some data from a TDBAdvGrid to a memory table via stream.

I tried the code below but I get an error message on both LoadFromStream methods.


var
  S : TMemoryStream;
begin
  S := TMemoryStream.Create;
  try
    DBAdvGrid1.SaveToStream(s);
    S.Position := 0;
    ClientDataSet1.LoadFromStream(s);//here I get an error
    VirtualTable1.LoadFromStream(S,true);//here I get an error


ClientDataSet1 is the TClientDataSet shipped with Delphi XE2 and VirtualTable1 is the free TVirtualTable downlodable from here http://www.devart.com/vtable/download.html

Is the stream generated by TDBAdvGrid.SaveToStream incompatible with the two memory tables I mention above ? If so, how can I transfer the data ?


Many thanks
Alberto

The stream generated by DBAdvGrid is not compatible with the memory stream expected by a dataset unfortunately.