next up previous contents index
Next: Datalog Up: Using the Interface Previous: Handling NULL Values   Contents   Index

Interface Flags

Users are given the option to monitor the SQL queries generated by the interface and their execution status by using the predicate odbc_flag/3. The first parameter indicates the function to be changed. The second argument is the old value, and the third argument specifies the new value. For example:

| ?- odbc_flag(show_query, Old, on).

     Old = off

SQL statements will now be displayed for all SQL queries (the default). To turn it off use odbc_flag(show_query,on, off). The default value for show_query is on.

To control the error behavior of either the interface or data sources use odbc_flag/3 with fail_on_error as first argument. For example:

| ?- odbc_flag(fail_on_error, on, off)
Gives all the error control to users, hence all requests to data sources return true. It's the users' responsibility to check each of their actions and do error handling.

| ?- odbc_flag(fail_on_error, off, on)
Interface fails whenever error occurs.

The default value of fail_on_error is on.



Luis Fernando P. de Castro 2003-06-27