4D v14.3BLOB Commands |
||
|
4D v14.3
BLOB Commands
BLOB Commands
4D supports the BLOB (Binary Large OBjects) data type. You can define BLOB fields and BLOB variables:
Note: There is no array for BLOBs. Within 4D, a BLOB is a contiguous series of variable length bytes, which can be treated as one whole object or whose bytes can be addressed individually. A BLOB can be empty (null length) or can contain up to 2147483647 bytes (2 GB). A BLOB is loaded into memory in its entirety. A BLOB variable is held and exists in memory only. A BLOB field is loaded into memory from the disk, like the rest of the record to which it belongs. Like the other field types that can retain a large amount of data (Picture and subtable field types), BLOB fields are not duplicated in memory when you modify a record. Consequently, the result returned by the commands Old and Modified is not significant when applied to a BLOB field. A BLOB can retain any type of data, so it has no default representation on the screen. If you display a BLOB field or variable in a form, it will always appear blank, whatever its contents. You can use BLOB fields to store any kind of data, up to 2 GB. You cannot index a BLOB field, so you must use a formula in order to search records on values stored in a BLOB field. 4D BLOBs can be passed as parameters to 4D commands or plug-in routines that expect a BLOB parameters. BLOBS can also be passed as parameters to a user method or be returned as a function result. To pass a BLOB to your own methods, you can also define a pointer to the BLOB and pass the pointer as parameter. Examples: ` Declare a variable of type BLOB Note for Plug-in developers: A BLOB parameter is declared as “&O” (the letter “O”, not the digit “0”). You can assign BLOBs to each other. Example: ` Declare two variables of type BLOB However, no operator can be applied to BLOBs; there is no expression of type BLOB. You can address each byte of a BLOB individually using the curly brackets symbols {...}. Within a BLOB, bytes are numbered from 0 to N-1, where N is the size of the BLOB. Example: ` Declare a variable of type BLOB Because you can address all the bytes of a BLOB individually, you can actually store whatever you want in a BLOB field or variable. 4D provides the following commands for working BLOBS:
These commands are described in this chapter. In addition:
|
PROPERTIES
Product: 4D SEE ALSO
APPEND DATA TO PASTEBOARD ARTICLE USAGE
4D Language Reference ( 4D v14 R2) Inherited from : BLOB Commands ( 4D v11 SQL Release 6) |