RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TBlobField.BlobSize Property

Indicates the number of bytes of data contained in the blob field on the current record.

Pascal
property BlobSize: Integer;
C++
__property int BlobSize;

Read BlobSize to determine the amount of memory required to store the contents of the BLOB field. Use BlobSize instead of the DataSize property, which always returns 0 for BLOB fields.

Note: Unlike the DataSize property, which specifies the size for field data on any record, BlobSize gives the size of the BLOB data for the current record only.
In the Delphi example below, a handler for the AfterScroll event of a TQuery, the value of the BlobSize property is displayed in the Caption of a form.

procedure TForm1.Query1AfterScroll(DataSet: TDataSet);
begin
  Caption := 'BLOB size: ' +
    IntToStr(TBlobField(Query1.FieldByName('BITMAP')).BlobSize);
end;

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!