Informix Error -4093: Type mismatch between RECORD and non-RECORD type.
Cause and resolution
Type mismatch between RECORD and non-RECORD type.
The compiler attempted to convert the result of one expression to conform with the type of another expression, and only one of them was a RECORD. Either both must be RECORD type, or neither can be.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4093 fires when the compiler tries to reconcile two expressions' types and only one of them
is a RECORD — per the official guidance, either both expressions must be RECORD type, or
neither can be.
- An expression pairing a record-typed value with a non-record type, per the official guidance — the direct, only cause.
Solutions / Resolution
- Make both sides of the expression consistently record-typed or non-record-typed.
Examples
Comparing a record to a plain value
DEFINE rec RECORD
order_id INTEGER
END RECORD
IF rec = 5 THEN
-- -4093: rec is a RECORD, 5 is not
END IF
Corrected
IF rec.order_id = 5 THEN
...
END IF
Diagnostic Checks
- Check every expression pairing a record-typed value with another type, and make both sides consistent.
Related Errors / Related Topics
- -4091 — "Cannot assign to or refer to an array as a whole. Use indexing to refer to
individual elements." The same type-reconciliation principle applied to
ARRAYvalues rather thanRECORDvalues. - -4092 — "Type mismatch between CLASS and non-CLASS type." The same
type-reconciliation principle applied to
CLASSvalues rather thanRECORDvalues.
An expression pairs a RECORD-typed value with a non-record type — make both sides
consistent.