Users are given the option to monitor control aspects of the ODBC interface by setting ODBC flags via the predicatesset_odbc_flag/2 and odbc_flag/2.
The first aspect that can be controlled is whether to display SQL statements for SQL queries. This is done by the show_query flag. For example:
| ?- odbc_flag(show_query,Val).
Val = on
Indicates that SQL statements will now be displayed for all SQL
queries, and is the default value for the ODBC interface. To turn it
off execute the command set_odbc_flag(show_query,on).
The second aspect that can be controlled is the action taken upon ODBC errors. Three possible actions may be useful in different contexts and with different drivers. First, the error may be ignored, so that a database call succeeds; second the error cause the predicate to fail, and third the error may cause an exception to be thrown to be handled by a catcher (or the default system error handler, see Volume 1).