Saving styles to a data table

General TRichView support forum. Please post your questions here
Post Reply
mphilbrick
Posts: 27
Joined: Mon Aug 29, 2005 7:08 pm

Saving styles to a data table

Post by mphilbrick »

Sergey,

I would like to store a TParaInfo instance in a BLOB field and retrieve it. How would I go about doing this?
Sergey Tkachenko
Site Admin
Posts: 17602
Joined: Sat Aug 27, 2005 10:28 am
Contact:

Post by Sergey Tkachenko »

TParaInfo is inherited from TCollectionItem.
You can save the whole collection to stream:

Code: Select all

var Writer: TWriter;

Writer := TWriter.Create(Stream, 4096);
Writer.WriteCollection(ParaStyles);
Writer.Free;
So you can create a collection, copy TParaInfo to it (using Assign method), then save it to blob stream.
Post Reply