next up previous contents index
Next: Transaction management Up: Using the interface: Previous: Other database operations:   Contents   Index

Interface Flags:

If you wish to see the SQL query generated by the interface use the predicate db_flag/3. The first parameter indicates the function you wish to change. The second argument is the old value, and the third argument specifies the new value. For example:

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

     Old = off

SQL statements will now be displayed for all your queries $($the default$)$. To turn it off use db_flag(show_query,on, off).

To enable you to control the error behavior of either the interface or Oracle database use db_flag/3 with fail_on_error as first argument. For example:

| ?- db_flag(fail_on_error, on, off)

Gives all the error control to you, (default), hence all requests to Oracle returns true. You have to check each action of yours and take the responsibility for your actions. (See 7.3.12)

| ?- db_flag(fail_on_error, off, on)

Interface fails whenever something goes wrong.

Baoqiu Cui