Informix Error -450
-450 Illegal ESQL locator, or uninitialized blob variable in 4GL.
A BYTE or TEXT host variable used in this statement is not valid. If this is a 4GL program, the variable has not been initialized by use of the LOCATE statement, or was freed after being located. Review the program logic to ensure all blob variables are located before use. If this is ESQL/C, the locator structure is invalid or uninitialized. Check that all locator structures are allocated and filled in before use.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-450 is a BLOB-handling error (BYTE/TEXT host variables) with slightly different specific
causes depending on the client environment:
- In 4GL, a
BYTE/TEXTvariable used without first being initialized viaLOCATE— blob variables need explicit location setup before use, unlike ordinary scalar host variables. - In 4GL, a blob variable that was freed after being located, then used again without re-locating it.
- In ESQL/C, an invalid or uninitialized locator structure referenced for a
BYTE/TEXThost variable — the ESQL/C equivalent of the same underlying requirement.
Solutions / Resolution
- In 4GL, ensure the blob variable is located via
LOCATEbefore use, per the official guidance, and confirm it hasn't been freed since. - In ESQL/C, ensure the locator structure is properly allocated and initialized before the statement using it executes.
- Review program logic broadly for the sequence: locate/allocate, use, and (if applicable) free — a blob variable used out of this order will trigger this error.
Examples
4GL: locating a blob variable before use
DEFINE my_blob BYTE;
LOCATE my_blob IN MEMORY;
-- now safe to use my_blob in a SELECT/INSERT statement
ESQL/C: allocating and initializing a locator
loc_t my_loc;
memset(&my_loc, 0, sizeof(my_loc));
my_loc.loc_loctype = LOCMEMORY;
/* now safe to use my_loc as the locator for a BYTE/TEXT
host variable */
Diagnostic Checks
- In 4GL, check for a
LOCATEstatement on the blob variable before its use, and confirm it wasn't freed since. - In ESQL/C, check the locator structure's initialization before the statement using it.
Related Errors / Related Topics
- -402 — "Address of a host variable is NULL." A related embedded-SQL host-variable structural error, though for ordinary host variables rather than blob locators specifically.
- -418 — "NULL SQLDA descriptor or host variable list encountered." Another related structural error in the same general embedded-SQL client-programming family.
Blob (BYTE/TEXT) host variables need explicit location/locator setup before use, unlike
ordinary scalar host variables — check the locate-use-free sequence for the specific variable
named in the error.