Data.DB.TParam.AsBlob
Delphi
property AsBlob: TBlobData read GetAsBytes write SetAsBlob;
C++
__property System::DynamicArray<System::Byte> AsBlob = {read=GetAsBytes, write=SetAsBlob};
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
property | public | Data.DB.pas Data.DB.hpp |
Data.DB | TParam |
Description
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.