Author: Jonas Bilinkevicius
How to store an RTF text in a database blob field without using a TDBRichEdit
Answer:
1 { ... }2 var3 blobS: TBlobStream;
4 begin5 blobS := TBlobStream.Create(TBlobField(table1.FieldByName('YourField')), bmWrite);
6 try7 table1.Edit;
8 try9 RichEdit1.Lines.SaveToStream(blobS);
10 table1.Post;
11 except12 table1.Cancel;
13 raise;
14 end;
15 finally16 blobS.Free;
17 end;
18 end;