RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TSQLBlobStream Class

TSQLBlobStream lets applications read from or write to BLOB fields in a client dataset.

Pascal
TSQLBlobStream = class(TMemoryStream);
C++
class TSQLBlobStream : public TMemoryStream;

SqlExpr

Use TSQLBlobStream to read the value of a Binary Large Object (BLOB) field in a dbExpress dataset (TSQLLDataSet, TSQLTable, TSQLQuery, or TSQLStoredProc). BLOB fields are TBlobField objects and descendants of TBlobField such as TGraphicField and TMemoField. BLOB fields in client datasets use client BLOB streams to implement many of their data access properties and methods. 

TSQLBlobStream allows objects that have no specialized knowledge of how data is stored in a BLOB field to read such data by employing the uniform stream interface. 

To use an SQL BLOB stream, create an instance of TSQLBlobStream, use the methods of the stream to read the data, and then free the BLOB stream. If you use the same instance of TSQLBlobStream to access data from more than one record, you must call the ReadBlobData method to update the stream when the current record changes.

Warning: Although TSQLBlobStream inherits several write methods from TMemoryStream, it can't be used to write data back to the dataset because dbExpress datasets are read-only. Writing to TSQLBlobStream simply alters the in-memory buffer that contains a BLOB field's data.
 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!