Informix Error -8128: Minimum length of a VARCHAR variable must be smaller than the maximum size.
Cause and resolution
Minimum length of a VARCHAR variable must be smaller than the maximum size.
A VARCHAR variable is defined with the two numbers name(n,r), where n is the maximum length of the variable and r is the reserved length. The reserved length is meaningful only in the context of a database table definition, although it is allowed when you define a report variable. If you specify it, you must write a number for r that is less than or equal to the size, n.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-8128 fires when a VARCHAR(n,r) variable's reserved length r exceeds its maximum length
n — per the official guidance, r is meaningful in a database table's context, but is
still allowed (and must be valid) when defining a report variable.
rgreater thannin aVARCHAR(n,r)variable definition, per the official guidance — the direct, only cause.
Solutions / Resolution
- Write
ras a number less than or equal ton, per the official guidance.
Examples
An invalid VARCHAR reserved length
DEFINE notes VARCHAR(100, 150)
-- -8128: reserved length (150) exceeds maximum (100)
Corrected
DEFINE notes VARCHAR(100, 20)
Diagnostic Checks
- Check every
VARCHAR(n,r)variable definition, and confirmris less than or equal ton.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -8128 in this set yet.
A VARCHAR(n,r) variable's reserved length exceeds its maximum length — correct r to be
less than or equal to n.