fgl_sqldebug()

Sets the SQL debug level from program code.

Syntax

fgl_sqldebug(
   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.

Usage

In order to produce SQL debug messages, one uses normally the FGLSQLDEBUG environment variable. However, FGLSQLDEBUG will produce SQL debug messages for the whole life time of a program.

The fgl_sqldebug() function can be used to force SQL debug log for a particular piece of code:

  • 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.