Skip to main content
Version: 21 R3

SET BLOB SIZE

SET BLOB SIZE ( blob : Blob ; size : Integer {; filler : Integer} )

ParameterTypeDescription
BlobBlob→BLOB field or variable
sizeInteger→New size of the BLOB
fillerInteger→ASCII code of filler character
History
ReleaseChanges
6Created

Description​

SET BLOB SIZE resizes the BLOB blob according to the value passed in size.

If you want to allocate new bytes to a BLOB and want to have those bytes initialized to a specific value, pass the value (0..255) into the filler optional parameter.

Note​

Compatiblity note: Since this command alters the blob passed as a parameter, it does not support blob objects (4D.Blob type). See Passing blobs and blob objects to 4D commands.

Error Handling​

If you cannot resize a BLOB due to insufficient memory, the error -108 is generated. You can trap this error using an ON ERR CALL interruption method.

Example 1​

When you are through with a large process or interprocess BLOB, it is good idea to free the memory it occupies. To do so, write:

 SET BLOB SIZE(aProcessBLOB;0)
 SET BLOB SIZE(◊anInterprocessBLOB;0)

Example 2​

The following example creates a BLOB of 16K filled of 0xFF:

 var vxData : Blob
 SET BLOB SIZE(vxData;16*1024;0xFF)

See also​

BLOB size

Properties​

Command number606
Thread safeyes