Informix Error -160: ISAM error: only one TEXT or BYTE field may be open at any time.
Cause and resolution
ISAM error: only one TEXT or BYTE field may be open at any time.
This internal error should not occur. The database server has called the isbopen function twice in a row. If the error recurs, note all circumstances and contact IBM Informix Technical Support.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-160 is flagged by the official text as an internal error that "should not occur" — the database
server itself called the internal isbopen function (which opens a TEXT/BYTE simple
large-object field) twice in a row without the expected intervening close. This sits closer to
-117/-142/-152's "escalate rather than self-diagnose extensively" category than to most of this
range's application-fixable conditions, but there's one scenario worth checking on the
application side first.
- An internal engine-level state inconsistency — the condition the official text describes
directly:
isbopencalled twice consecutively, which isn't expected to happen through normal engine operation. - A complex query referencing multiple
TEXT/BYTEcolumns together in a way that stresses the single-large-object-field-open-at-a-time constraint — potentially exposing an edge case in query planning around large object columns. - Application code using ESQL/C-level BLOB APIs directly, if it exists in the affected code
path — a program calling
isbopen()itself without a matchingisbclose()before a subsequent open is the one plausible application-level source of this condition, distinct from a genuine engine-internal issue.
Solutions / Resolution
- If this recurs, note all circumstances and contact IBM Informix Technical Support, per the official guidance — this is framed as an internal condition without a documented, application-level fix for the general case.
- If application code directly uses ESQL/C-level BLOB open/close calls, review it
specifically for a missing
isbclose()before a subsequentisbopen()— this is the one scenario where application code, rather than the engine itself, could plausibly be the actual source. - If triggered by a specific complex query pattern referencing multiple
TEXT/BYTEcolumns together, try restructuring the query to process one large-object field at a time as a practical workaround while investigating further. - Capture the exact query or operation and full surrounding circumstances for a support case — given the official framing, this is more valuable than extended independent troubleshooting.
Examples
Reviewing ESQL/C BLOB call pairing, if applicable
isbopen(fd, ...);
/* ... work with the large object field ... */
isbclose(fd); /* must run before any subsequent isbopen() call */
If a code path is found calling isbopen() again before this close, that's the fix — pair every
open with a close before opening another TEXT/BYTE field.
Restructuring a query touching multiple large object columns
-- If a query referencing two TEXT/BYTE columns together triggers this:
SELECT doc_text, image_data FROM documents WHERE id = 1;
-- Consider retrieving them separately as a practical workaround:
SELECT doc_text FROM documents WHERE id = 1;
SELECT image_data FROM documents WHERE id = 1;
Diagnostic Checks
- Review whether application code directly uses
isbopen()/isbclose(), and check that every open is paired with a close before another open. - Identify the specific query or operation that triggered the error, especially whether it
references multiple
TEXT/BYTEcolumns together. - Capture full circumstances for escalation if the cause isn't found in application-level BLOB API usage — per the official guidance, this is expected to be rare enough to warrant a support case rather than continued self-diagnosis.
Related Errors / Related Topics
- -100 — "ISAM error: duplicate value for a record with unique key." The other foundational ISAM-level error in this family, though unrelated in cause — grouped here as background on how this error class is organized.
Check for direct ESQL/C BLOB API usage in the affected code path first — it's the one place an application could plausibly cause this rather than the engine itself.