Monitoring the ODBC Connection

ODBC Connection statistics may be viewed by adding a Show Stats button to your application.  This button can be added from the ODBC manager library (see the Show Stats Drawing Method in the chapter Drawing Tags).

A Show Status button, when clicked on by the operator, will open the ODBC Statistics screen as shown in the following image.

 In the upper left corner, a selection list allows you to choose which of the ODBC data source to view of the ones configured for this application.

Enabling the log causes all activity related to the driver to be stored in a file named ODBCManager.LOG.   An example of the information logged is as follows:

Date/Time    : 2008-08-18 10:33:05

VTS Error    : 0

VTS Message  : No Error

Owner        : LogLoop

DSN          : august

Query        : INSERT INTO VTS_TAGDATA

  (TagID,LogTimeStamp,TagVariableValue,ManualFlag,QuestionableFlag,AlarmFlag)

  VALUES (1,#2008/08/18 13:33:05#,0,0,0,0)

ODBC Error   : 0

ODBC Message : N/A

SQL State    : N/A

Note that it is possible to close the ODBC Statistics screen while the log is still enabled.  Use this feature with caution: it can result in an excessively large log file being created over time.