Page 1 of 1

InsertRVFFromStreamEd vs InsertRVFFromStream

Posted: Tue Oct 25, 2016 7:32 am
by tothpaul
Hello,

I have an application with portions of RVF in a database, I need to merge them in a RV.

I've added two Helper for that

Code: Select all

procedure TCustomRichViewEditHelper.InsertField(Field: TField);
var
  Blob: TStream;
begin
  Format(); // required by InsertRVFFromStreamEd
  Blob := Field.DataSet.CreateBlobStream(Field, TBlobStreamMode.bmRead);
  try
    InsertRVFFromStreamEd(Blob);
  finally
    Blob.Free;
  end;
end;

procedure TCustomRichViewEditHelper.AppendField(Field: TField);
var
  Blob: TStream;
begin
  Blob := Field.DataSet.CreateBlobStream(Field, TBlobStreamMode.bmRead);
  try
    InsertRVFFromStream(Blob, ItemCount);
    Format();
  finally
    Blob.Free;
  end;
end;
do you see any reason why InsertField do not insert the document at all, while AppendField do the job ?!


Regards

Posted: Tue Oct 25, 2016 9:03 am
by Sergey Tkachenko
Probably, because this TRichViewEdit's ReadOnly=True? Or may be there is a text protection.
InsertRVFFromStreamEd is an editing method, it takes the options above into account.

Posted: Tue Oct 25, 2016 12:21 pm
by tothpaul
hum...text protection probably.

Thanks