Informix Error -16395: Cannot compare BLOBs to any other value.
Cause and resolution
Cannot compare BLOBs to any other value.
You asked the Debugger to compare a TEXT or BYTE variable in an expression. You cannot use variables of these types for comparisons. (However, you can refer to a substring of a TEXT variable.)
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-16395 fires when a TEXT/BYTE variable is used in a comparison expression — per the
official guidance. These types can't be compared, though a TEXT variable's substring can
still be referenced.
- A
TEXT/BYTEvariable used in a comparison, per the official guidance — the direct, only cause.
Solutions / Resolution
- Remove the
TEXT/BYTEvariable from the comparison, per the official guidance — reference a substring of aTEXTvariable instead, if that's what's needed.
Examples
Comparing a TEXT variable
> PRINT mytext = "value"
Corrected — comparing a substring instead
> PRINT mytext[1,5] = "value"
Diagnostic Checks
- Check the expression for a
TEXT/BYTEvariable used in a comparison, and remove it or substitute a substring reference.
Related Errors / Related Topics
- -16396 — "Cannot use BLOBs in this expression." The general restriction on using
TEXT/BYTEvariables in expressions, which comparison is one specific case of.
A TEXT/BYTE variable can't be compared — use a substring reference instead, if needed.