From RAD Studio API Documentation
Jump to: navigation, search


property AsBlob: TBlobData read GetAsBytes write SetAsBlob;


__property System::DynamicArray<System::Byte> AsBlob = {read=GetAsBytes, write=SetAsBlob};


Type Visibility Source Unit Parent
property public
Data.DB TParam


Specifies the value of the parameter when it represents a binary large object (BLOB) field.

Set AsBlob to assign the value for a Blob field to the parameter. AsBlob takes a TBlobData (Delphi) or an AnsiString (C++) value, which can act as an untyped string of bytes. Setting AsBlob sets the DataType property to ftBlob.

For example, if the variable Buffer is of type PChar and contains binary data read from a file, the contents of Buffer are directly assigned to the BLOB parameter using the AsBlob property:

Query1.Params[0].AsBlob := Buffer;

Note: Applications seldom need to read AsBlob because Blob fields cannot be used as output parameters.

See Also