The fields of the locator structure
- The loc_loctype field identifies the location of the simple-large-object
data. It also indicates the variant type of the lc_union structure.
For more information about loc_loctype, see Locations for simple-large-object data.
- The lc_union structure is a union (overlapping variant
structures) structure.
The variant in use depends on where can expect to find the simple large object at run time. For more information about this structure, see Locate simple large objects in memory and Locate simple large objects in files.
- Several fields are common to all types of simple-large-object variables.
Field | Data type | Description |
---|---|---|
loc_indicator | 4-byte integer | A value of -1 in the loc_indicator field
indicates a null simple-large-object value. The program
can set the field to indicate insertion of a null value; libraries
set it on a select or fetch.For consistent behavior on various platforms, it is advised to set the value of the indicator to 0 or -1. If indicator is not set you can experience inconsistent behavior. The value set in the indicator field takes the higher precedence when set. You can also use the loc_indicator field to indicate an error when your program selects into memory. If the simple large object to be retrieved does not fit in the space provided, the loc_indicator field contains the actual size of the simple large object. |
loc_size | 4-byte integer | Contains the size of the simple-large-object data in bytes. This field indicates the amount of simple-large-object data that the libraries read or write. The program sets loc_size when it inserts a simple large object in the database; the libraries set loc_size after it selects or fetches a simple large object. |
loc_status | mint | Indicates the status of the last locator operation. The libraries set loc_status to zero when a locator operation is successful and to a negative value when an error occurs. The SQLCODE variable also contains this status value. |
loc_type | 4-byte integer | Specifies whether the data type of the variable is TEXT (SQLTEXT) or BYTE (SQLBYTES). The sqltypes.h header file defines SQLTEXT and SQLBYTES. |