Earlier, I used to save RTF data as blob in SQL server 2014, now i have moved to RVF format for better control.
On loading, is there a way to know, whether the data saved is RVF or RTF, so that we can set the viewer accordingly.
I use the following procedure to load the data into TRichviewEdit.
Certlist is the Table, 'current_advice' is the blob field
procedure TEditor.LoadReportData;
var Stream: TMemoryStream;
begin
try
Stream := TMemoryStream.Create;
(CertList.FieldByName('Current_advice') as TBlobField).SaveToStream(Stream);
Stream.Position := 0;
TransitData.LoadRVFFromStream(Stream);
TransitData.Format;
finally
Stream.Free;
end;
end;
Thanks in advance
Identify RTF or RVF
-
- Site Admin
- Posts: 17569
- Joined: Sat Aug 27, 2005 10:28 am
- Contact:
Re: Identify RTF or RVF
Change LoadRVFFromStream to LoadFromStream(Stream, rvynaAuto);
LoadFromStream can detect RTF and RVF.
LoadFromStream can detect RTF and RVF.
Re: Identify RTF or RVF
Thanks, Sergy for the prompt reply. Problem solved.