[top] [up] [next]

Debugging tips


ODBC tracing

To make debugging ODBC applications easier there is the possibility of logging all ODBC statements executed and their return values. This option can be turned on or off by using the ODBC administrator application located in the Control Panel of Microsoft Windows. If ODBC tracing is switched on all the ODBC function calls of all applications running are logged, not just the Trinc-Prolog database application(s). Below there is a screen shot of the tabpage which can be used for turning ODBC tracing on or off.

pl_img63.gif (10102 bytes)
ODBC error messages

If the error messages generated by Trinc-Prolog do not give enough information about what is going wrong then it is possible to have Trinc-Prolog display the actual ODBC error messages with error codes, etc.. To turn displaying of ODBC messages on or off use the method putDebugMode/1of the dbSession class. All ODBC error message are described in the ODBC SDK which can be downloaded for free from the website of Microsoft, see support and software requirements. Below there is an example of the kind of error message displayed.

pl_img67.gif (4008 bytes)

The catalog query methods can also be usefull to determine for instance; the data types supported by a database and properties of tables, procedures and table columns. see Catalog methods.

Arrow.gif (1632 bytes) There are some DBMS's that do not allow more than 1 connection from a single application to a single database. Make sure to check if a database allows multiple connections to the same database before using two query instances simultaneously. If the debug mode of ODBC is turned on then a message like 'Connection is busy with results for another hstmt' might be displayed.

[top] [up] [next]

 

info@trinc-prolog.com