Data.Win.ADODB.TADOBlobStream

From RAD Studio API Documentation
Jump to: navigation, search

System.Classes.TMemoryStreamSystem.Classes.TCustomMemoryStreamSystem.Classes.TStreamSystem.TObjectTADOBlobStream

Delphi

TADOBlobStream = class(TMemoryStream)

C++

class PASCALIMPLEMENTATION TADOBlobStream : public System::Classes::TMemoryStream

Properties

Type Visibility Source Unit Parent
class public
Data.Win.ADODB.pas
Data.Win.ADODB.hpp
Data.Win.ADODB Data.Win.ADODB

Description

TADOBlobStream is a stream object that reads from and writes to field objects that represent Binary large object (BLOB) fields.

Use TADOBlobStream to access or modify the value of a BLOB or memo field in an ADO dataset. BLOB fields are represented by TBlobField objects and descendants of TBlobField such as TGraphicField and TMemoField.

TADOBlobStream allows objects that have no specialized knowledge of how data is stored in a BLOB field (raw binary data) to read or write such data by employing the uniform stream interface.

To use an ADO BLOB stream, create an instance of TADOBlobStream, use the methods of the stream to read or write the data, and then free the BLOB stream. Do not use the same instance of TADOBlobStream to access data from more than one record. Instead, create a new TADOBlobStream object every time you need to read or write BLOB data on a new record.

Use the Read method to copy the data from BLOB field object to a null-terminated string (or comparable) buffer. Use the Write method to copy from buffer to BLOB field object. When reading data from the BLOB field object, use the Size property to determine the volume of the field's contents and to allocate the correct amount of space in memory for the receiving buffer.

See Also