Parameter settings to aid debugging
While developing an application that involves access to external data sources (and in particular when using ODBC) it is advisable to enable the output of error messages from the driver and possibly other debug information. The module mmodbc defines the following parameters to enable debug output and to retrieve information about the SQL statements that have been executed (for a complete list of the module parameters the reader is refered to the mmodbc documentation in the `Mosel Language Reference Manual'). To obtain the corresponding mmoci parameter names, replace the prefix SQL by OCI.
- SQLverbose
- Enable/disable mesasge printing by the ODBC driver.
- SQLdebug
- Enable/disable debug mode.
- SQLrowcnt
- Number of lines affected by the last SQL command.
- SQLrowxfr
- Number of lines transfered by the last SQL command.
- SQLsuccess
- Indicates whether the last SQL command succeeded.
- SQLconnection
- Identification number of the active connection to a database.
Parameters are set and retrieved with Mosel statements similar to the following:
setparam("SQLdebug", true) writeln("Number of lines transfered: ", getparam("SQLrowxfr"))
With the odbc driver you may also use the `debug' option of the driver instead of the global setting:
initializations to "mmodbc.odbc:debug;data.xls" A as "MyOutTable1" end-initializations
or
initializations to "mmodbc.odbc:data.xls" A as "debug;MyOutTable1" end-initializations
In the first case, the setting applies to the whole initializations block, in the second case only to the specific statement (there may be any number of statements in a single block).
With the oci driver, a connection string including the `debug' option as global setting will look as follows:
initializations to "mmoci.oci:debug;myusername/mypassword@dbname" A as "MyOutTable1" end-initializations
© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.