Informix Error -22626: Empty SQL statement.
Cause and resolution
Empty SQL statement.
This message indicates an IBM Informix ESQL/FORTRAN preprocessor error. SQL statements and precompile instructions that are embedded in a FORTRAN program must be preceded by the keywords EXEC SQL. No statement terminator is required, except when you specify a multiple-statement object in a PREPARE statement.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-22626 fires when an embedded SQL statement or precompile instruction isn't preceded by
EXEC SQL — per the official guidance, SQL statements and precompile instructions
embedded in a FORTRAN program must be preceded by the keywords EXEC SQL; no statement
terminator is required except when specifying a multiple-statement object in a PREPARE
statement.
- An embedded SQL statement/precompile instruction not preceded by
EXEC SQL, per the official guidance — the direct, only cause.
Solutions / Resolution
- Precede the statement with
EXEC SQL, per the official guidance.
Examples
A missing EXEC SQL prefix
SELECT * FROM orders
Corrected
EXEC SQL SELECT * FROM orders
Diagnostic Checks
- Check the flagged statement for a missing
EXEC SQLprefix, and add it.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -22626 in this set yet.
An embedded SQL statement wasn't preceded by EXEC SQL — add the prefix.