Dynamic Logging Support without ODBC Driver Manager Tracing

Adaptive Server Enterprise ODBC Driver 15.7 introduced the application logging without an ODBC driver manager tracing feature.

The application logging can be enabled (or disabled) for the duration of application execution. See Logging without ODBC Driver Manager tracing.

ESD #4 extends this support by allowing you to dynamically enable or disable the application logging during application execution by setting the new SQL_OPT_TRACE environment attribute. Valid values are 0 (default) to disable or 1 to enable.

// enable logging
SQLSetEnvAttr(0, SQL_OPT_TRACE, (SQLPOINTER)1,
  SQLINTEGER);
// disable logging
SQLSetEnvAttr(0, SQL_OPT_TRACE, (SQLPOINTER)0,
  SQLINTEGER);