I have a field in a database table that holds the contents of a WPRichText component with tags as Stream
I would like to concatenate the streams of a select on that field:
"Select TOP 5 STREAM_TEXT From Table"
And display these five contents on a WPRichText
Stream := TMemoryStream.Create;
TempStream := TMemoryStream.Create;
WPRichTextResult.ReadOnly := False;
WPRichTextResult.Clear;
WPRichTextResult.AsString := '';
while not dmSGA.QBusca.Eof do
begin
TBlobField(dmSGA.QBusca.FieldByName('STREAM_TEXT')).SaveToStream(TempStream);
Stream.CopyFrom(TempStream, 0);
Stream.seek(0, soEnd);
Stream.CopyFrom(TempStream, 0);
WPRichTextResult.LoadFromStream(Stream); // load stream contents into rich
dmSGA.QBusca.Next;
end;
Stream.Free;
TempStream.Free;