Page 1 of 1

Saving styles to a data table

Posted: Mon Mar 12, 2007 8:35 pm
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?

Posted: Tue Mar 13, 2007 2:49 pm
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.