Informix Error -165: ISAM error: TEXT or BYTE column does not exist.
Cause and resolution
ISAM error: TEXT or BYTE column does not exist.
This internal error should not occur. The database server has called the isbcreate function for a table column that is not defined as BYTE or TEXT. If the error recurs, note all circumstances and contact IBM Informix Technical Support.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-165 is flagged by the official text as another internal error that "should not occur" — the
database server called the internal isbcreate function against a column the catalog doesn't
actually define as BYTE/TEXT. Same general category as -160/-161: check the one
plausible application-level source before treating this as purely engine-internal.
- An internal engine-level inconsistency between what a call believes about a column's type and its actual catalog definition — the condition the official text describes directly.
- A schema change interacting badly with in-flight operations or cached query plans. An
ALTER TABLEthat changes a column's type away fromBYTE/TEXT, combined with a prepared statement or cached plan still referencing the old column type, could plausibly produce this kind of mismatch. - Application code directly using ESQL/C large-object creation APIs (
isbcreate) against the wrong column reference — the direct application-level analog to this condition, if the affected code path uses low-level BLOB creation calls itself. - Catalog inconsistency, rare, causing the engine's own understanding of a column's type to be wrong.
Solutions / Resolution
- If this recurs, note all circumstances and contact IBM Informix Technical Support, per the official guidance — framed as an internal condition without a documented general fix.
- If application code directly calls
isbcreate()via ESQL/C, review the column reference being passed to confirm it actually targets aBYTE/TEXTcolumn. - If this appeared right after a schema change altering a column's type, check whether cached query plans or prepared statements need to be re-prepared against the current schema rather than reused from before the change.
- Capture full circumstances — the statement involved and recent schema history — for escalation if application-level review doesn't reveal a cause.
Examples
Reviewing an ESQL/C column reference
/* Confirm the column actually being targeted is defined as BYTE or TEXT */
isbcreate(fd, column_number, ...);
If column_number doesn't correspond to an actual BYTE/TEXT column in the current schema,
that mismatch is the fix to make — correct the reference to target the right column.
A schema change interacting with a stale prepared statement
-- Column was BYTE, an application held a prepared statement referencing it
ALTER TABLE documents MODIFY (content VARCHAR(500));
-- content is no longer BYTE/TEXT
-- The application's stale prepared statement, still referencing the
-- old column definition, may need to be re-prepared rather than reused
Diagnostic Checks
- Review whether application code directly uses
isbcreate(), and confirm the column reference passed actually targets aBYTE/TEXTcolumn in the current schema. - Check for a recent schema change to the column in question, and whether cached/prepared statements were re-prepared afterward.
- Capture full circumstances for escalation if the cause isn't found in application-level BLOB API usage or recent schema changes.
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." Part of the same
general category of internal
TEXT/BYTEhandling conditions the official documentation flags as unexpected.
Check for a recent schema change to the column in question first — a stale prepared statement or cached plan referencing an old column definition is the most plausible non-engine-internal explanation.