Informix Error -280
-280 A quoted string exceeds 256 bytes.
A character literal in this statement exceeds the maximum length. Check the punctuation and length of all quoted strings in the statement. Possibly two missing quotes make a long string out of two short ones. You must revise the statement to use a shorter character string.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-280 is a specific literal-length limit with the same punctuation-error possibility as -201: a character literal exceeded 256 bytes, and that's sometimes because two separate short strings merged into one long apparent one.
- A character literal genuinely exceeding 256 bytes.
- Missing quotes merging two short strings into one long one. The official text specifically calls this out — a missing closing or opening quote can make the parser read what were intended as two separate string literals as a single, much longer one.
- Auto-generated SQL embedding large text values directly as literals, rather than using host or bind variables.
Solutions / Resolution
- Check punctuation and length of every quoted string in the statement, per the official guidance.
- Look specifically for a missing quote that might be merging two short strings into one long one.
- Revise the statement to use a shorter character string if the length is genuinely needed and can be reduced.
- For genuinely large text values, use host or bind variables instead of embedding the value directly as a literal in the SQL text — this both avoids the 256-byte literal limit and is generally safer against SQL injection in dynamically-built statements.
Examples
A missing quote merging two strings
SELECT * FROM customer WHERE name = 'Jane Doe AND status = 'active';
-- -280: the missing closing quote after "Jane Doe" merges the rest
-- of the statement into one long string literal
Fix:
SELECT * FROM customer WHERE name = 'Jane Doe' AND status = 'active';
A genuinely long literal, parameterized instead
-- Instead of embedding a large text value directly:
INSERT INTO documents (content) VALUES ('... a very long string over 256 bytes ...');
-- Use a host/bind variable:
INSERT INTO documents (content) VALUES (:large_text_value);
Diagnostic Checks
- Review each quoted string's length in the failing statement.
- Look for a missing opening or closing quote specifically — this is often the actual cause even when the statement appears to have only reasonably-sized string literals.
Related Errors / Related Topics
- -201 — "A syntax error has occurred." The general punctuation-error family — the same missing-quote/missing-comma theme applies here.
- -235 — "Character column size is too big." A related length-limit condition, though for column definitions rather than literal values in a statement.
Check for a missing quote before assuming any single string literal is genuinely too long — that's the cause the official guidance itself calls out directly.