Identify RTF or RVF
Posted: Fri Oct 26, 2018 4:02 am
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
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