Allocate the memory buffer
When your program selects simple-large-object data into memory, Informix® ESQL/C uses a memory buffer.
Before your program fetches TEXT or BYTE data, you must set the loc_bufsize (lc_union.lc_mem.lc_bufsize)
field as follows to indicate how Informix®
ESQL/C allocates
this memory buffer:
- If you set the loc_bufsize to
-1
, Informix® ESQL/C allocates the memory buffer to hold the simple-large-object data. - If you set the loc_bufsize to a value that is not
-1
, Informix® ESQL/C assumes that the program handles memory-buffer allocation and deallocation.
Important: When you locate simple large objects in
memory, you must always set loc_mflags (lc_union.lc_mem.lc_mflags)
and loc_oflags to 0 initially.