Data.SqlExpr.TSQLBlobStream

From RAD Studio API Documentation
Jump to: navigation, search

System.Classes.TMemoryStreamSystem.Classes.TCustomMemoryStreamSystem.Classes.TStreamSystem.TObjectTSQLBlobStream

Delphi

TSQLBlobStream = class(TMemoryStream)

C++

class PASCALIMPLEMENTATION TSQLBlobStream : public System::Classes::TMemoryStream

Properties

Type Visibility Source Unit Parent
class public
Data.SqlExpr.pas
Data.SqlExpr.hpp
Data.SqlExpr Data.SqlExpr

Description

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

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.

See Also