RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TParam.AsBlob Property

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

Pascal
property AsBlob: TBlobData;
C++
__property TBlobData AsBlob;

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 can't be used as output parameters.
 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!