Sets the SQL debug level from program code.


   level INTEGER )
  1. level is the SQL debug level to set. Zero resets the level defined by FGLSQLDEBUG. -1 prints SQL debug information only for SQL statements producing an error.


The FGLSQLDEBUG environment variable can be set, to get SQL debug information for all SQL statements executed by a program. The SQL debug output is written to the stderr stream.

When program code can be modified and recompiled, the fgl_sqldebug() function can be used to force SQL debug log to isolate a specific set of SQL instructions:

  • When calling fgl_sqldebug() with a value different from zero, it has the same effect as setting FGLSQLDEBUG.
  • When calling fgl_sqldebug() with zero, it resets the SQL debug level defined by FGLSQLDEBUG.