Informix Error -4034: SQL statements and two-pass reports are not allowed when compiling with the "-nosql" switch.
Cause and resolution
SQL statements and two-pass reports are not allowed when compiling with the "-nosql" switch.
The compiler was invoked with the "-nosql" switch, but the source included either explicit SQL statements or a two-pass report (which involves SQL statements). Compiling with "-nosql" causes generation of .c code (instead of .ec code) in which no SQL statements are allowed.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-4034 fires when the compiler is invoked with -nosql but the source includes explicit SQL
statements or a two-pass report — per the official guidance, -nosql generates .c code
(instead of .ec code), which doesn't permit SQL statements.
- The source includes explicit SQL statements while compiling with
-nosql, per the official guidance — the first named cause. - The source includes a two-pass report, which itself involves SQL statements, per the official guidance — the second named cause.
Solutions / Resolution
- Remove SQL statements and two-pass reports from the source, or
- Compile without
-nosqlif SQL access is genuinely needed, consistent with the official guidance's identification of-nosqlas generating non-SQL-capable.ccode.
Examples
Checking the compiler invocation
4gl -nosql myprogram.4gl
Diagnostic Checks
- Check whether
-nosqlis passed to the compiler, and whether the source contains SQL statements or two-pass reports that require it to be omitted.
Related Errors / Related Topics
No closely related error codes are cross-referenced for -4034 in this set yet.
SQL statements or a two-pass report were found while compiling with -nosql — remove them, or
drop -nosql from the compile.