Informix Error -650
-650 Maximum varchar size has been exceeded.
This statement specifies a VARCHAR(m, r) column with a maximum width m greater than allowed (255). Check the punctuation of the column definition. If it is as you intended, redesign the table to use a VARCHAR width that ranges from 1 character to 255 characters.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-650 fires when a VARCHAR(m, r) column definition's maximum width m exceeds 255 — per the
official guidance, 255 characters is the hard ceiling for VARCHAR.
- A
VARCHARwidth declared larger than 255, per the official guidance — the direct, only cause. - A punctuation slip in the column definition, per the official guidance's suggested check —
confirm the numbers in
VARCHAR(m, r)weren't transposed or mistyped. - Content genuinely expected to exceed 255 characters, where
VARCHARwas the wrong type choice from the start.
Solutions / Resolution
- Check the punctuation of the column definition, per the official guidance, in case the width was mistyped.
- Redesign the table to use a
VARCHARwidth between 1 and 255 characters, per the official guidance, if a value within that range is actually sufficient. - Use
LVARCHARorTEXTinstead ofVARCHAR, if content genuinely needs to exceed 255 characters —VARCHAR's 255-character ceiling is a hard type limit, not a tunable setting.
Examples
Exceeding the limit
CREATE TABLE documents (doc_id INT, summary VARCHAR(500));
-- -650: 500 exceeds the 255-character maximum for VARCHAR
Corrected — within the limit
CREATE TABLE documents (doc_id INT, summary VARCHAR(255));
Or using a type without the 255-character ceiling
CREATE TABLE documents (doc_id INT, summary LVARCHAR(2000));
Diagnostic Checks
- Check the declared width against the 255-character
VARCHARceiling. - Confirm whether the content genuinely needs more than 255 characters, in which case
LVARCHAR/TEXTis the appropriate type rather than trying to raiseVARCHAR's limit.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -650 in this set yet.
A hard 255-character ceiling on VARCHAR — use LVARCHAR/TEXT instead if the content
genuinely needs to be wider.