InsertRVFFromStreamEd vs InsertRVFFromStream

General TRichView support forum. Please post your questions here
Post Reply
tothpaul
Posts: 42
Joined: Fri Feb 06, 2015 10:41 am

InsertRVFFromStreamEd vs InsertRVFFromStream

Post 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
Sergey Tkachenko
Site Admin
Posts: 17571
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post 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.
tothpaul
Posts: 42
Joined: Fri Feb 06, 2015 10:41 am

Post by tothpaul »

hum...text protection probably.

Thanks
Post Reply