Informix Error -617
-617 A TEXT or BYTE data type must be supplied within this context.
This statement assigns a value that is not a simple large object to a BYTE or TEXT column or assigns a BYTE or TEXT column to a column that is not a simple large object. Neither action is supported. BYTE and TEXT values must be assigned as whole units to columns of the same type. Check that the statement specifies the columns that you intended.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-617 is the mirror image of -608: it fires when a non-BLOB value is assigned to a
TEXT/BYTE column, or a TEXT/BYTE column is assigned to a non-BLOB column — per the
official guidance, these values must be assigned as whole units to columns of the same type in
either direction.
- A literal or ordinary-typed expression assigned to a
TEXT/BYTEcolumn, where aTEXT/BYTEsource value was expected instead. - A
TEXT/BYTEcolumn assigned to a column of a different type, the same underlying restriction as -608, encountered from this direction of the assignment. - A column-naming mistake, per the official guidance's suggested check — confirm the statement specifies the columns actually intended.
Solutions / Resolution
- Check that the statement specifies the columns intended, per the official guidance — this error often surfaces a naming mistake rather than a genuine type problem.
- Assign
TEXT/BYTEvalues as whole units only to columns of the same type, per the official guidance, in both directions of the assignment. - If a literal default is needed for a
TEXT/BYTEcolumn, remember onlyNULLis valid (per -594) — a non-NULL literal can't be supplied as a substitute for real BLOB content.
Examples
The disallowed attempt
UPDATE documents SET content = 'placeholder text' WHERE doc_id = 1;
-- -617: 'placeholder text' is a plain string literal, not a TEXT/BYTE value
Corrected — supplying an actual TEXT/BYTE source
UPDATE documents SET content = (SELECT content FROM document_templates WHERE template_id = 1)
WHERE doc_id = 1;
Diagnostic Checks
- Check the declared type of both sides of the assignment, confirming a genuine
TEXT/BYTEvalue is being supplied where one is required.
Related Errors / Related Topics
- -608 — "Illegal attempt to convert Text/Byte data type." The mirror-image restriction: a
TEXT/BYTEcolumn assigned to (or combined with) a non-BLOB type. - -609 — "Illegal attempt to use Text/Byte host variable." The same family of restrictions, for host variables in embedded SQL.
The mirror image of -608 — a real TEXT/BYTE source value is required here, not a plain
literal or a differently-typed column.