Informix Error -161: ISAM error: no TEXT or BYTE field is open.
Cause and resolution
ISAM error: no TEXT or BYTE field is open.
This internal error should not occur. The database server has called a TEXT or BYTE function without first calling isbopen. If the error recurs, note all circumstances and contact IBM Informix Technical Support.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-161 is the direct mirror of -160: instead of isbopen being called twice without an
intervening close, this is a TEXT/BYTE manipulation function being called without isbopen
having been called first at all. The official text uses the identical framing — "this internal
error should not occur" — so the same posture applies: check the one plausible application-level
source before treating this as purely an engine-internal condition to escalate.
- An internal engine-level state inconsistency, per the official text's own framing — not expected to occur through normal engine operation.
- Application code using ESQL/C-level BLOB APIs directly, calling a
TEXT/BYTEmanipulation function without a precedingisbopen()call — the direct counterpart mistake to -160's "double open without an intervening close." - Complex queries involving
TEXT/BYTEcolumns potentially exposing the same class of internal sequencing edge case as -160, from the other direction.
Solutions / Resolution
- If this recurs, note all circumstances and contact IBM Informix Technical Support, per the official guidance — the same posture as -160.
- Review ESQL/C code for
isbopen()call ordering, if the affected code path uses low-level BLOB APIs directly — confirmisbopen()always precedes anyTEXT/BYTEmanipulation function, with no path that skips it. - Capture full circumstances for a support case if application-level review of BLOB API usage doesn't reveal a cause — per the official framing, extended independent troubleshooting has limited value beyond this check.
Examples
Reviewing ESQL/C call ordering
/* Wrong: manipulating the field without opening it first */
isbread(fd, buf, len); /* -161: isbopen() was never called */
/* Right */
isbopen(fd, ...);
isbread(fd, buf, len);
isbclose(fd);
If a code path is found calling a TEXT/BYTE function without a preceding isbopen(), adding
the missing call is the fix.
Diagnostic Checks
- Review whether application code directly uses ESQL/C BLOB API functions, and confirm every
TEXT/BYTEmanipulation call is preceded by a successfulisbopen(). - Identify the specific query or operation that triggered the error, especially if it
involves
TEXT/BYTEcolumns in an unusual way. - Capture full circumstances for escalation if the cause isn't found in application-level BLOB API usage.
Related Errors / Related Topics
- -100 — "ISAM error: duplicate value for a record with unique key." The other foundational ISAM-level error in this family.
- -160 — "ISAM error: only one TEXT or BYTE field may be open at any time." The direct
mirror-image condition — -160 is calling
isbopentwice without closing; -161 is calling aTEXT/BYTEfunction without ever having calledisbopenat all.
Check ESQL/C isbopen()/isbclose() pairing first, exactly as with -160 — it's the one place
application code, rather than the engine itself, could plausibly cause this.