Using the SQL Task Dialog Box

The iFIX ODBC SQL Task must be configured to meet your application requirements. This is done through the SQL Task dialog box.

The SQL Task Configuration dialog box defines how the SQL task executes SQL commands and allows you to define how data is handled when iFIX ODBC is operating. Each dialog box field is described below:

SQL Support – enables or disables the FIX ODBC option. Select an option button to enable or disable this application.

Error/Debug Message Routing – displays the Configure Alarm Areas - SQL Error Messages or SQL Debug Messages dialog box. Using this dialog box, you can enable the alarm areas that receive error or debug messages generated by iFIX ODBC. Error messages indicate that the SQL system task encountered an error. Debug messages provide information to help you troubleshoot the connection to the relational database. Refer to the Implementing Alarms and Messages manual for more information on how iFIX performs alarming.

Error/Debug message to screen – determines if error or debug messages are sent to the SQL task. Select each check box to enable this function.

Primary and Secondary Backup Files – defines the primary and secondary back-up paths and file names that iFIX ODBC uses when it cannot write to the relational database. If iFIX ODBC cannot connect to the server, or loses a connection with the relational database, it backs-up data to the file identified in the Primary path field. If iFIX ODBC fails to write to this file, it backs-up data to the file identified in the Secondary path field.

If you set the primary path to a file server, consider setting the secondary path to a local drive. With this configuration, if iFIX ODBC cannot connect to the server because of a bad cable connection, the secondary path can back-up data to the local drive. Once iFIX ODBC re-establishes a connection to the relational database, it first processes any backed up SQL commands and data. The back-up file is deleted when the back-up operation completes.

NOTE: Backed-up SQL commands are processed on a first in, first out (FIFO) basis.

You can enter any valid iFIX path in these fields along with a back-up file name. Enter the path and file name in the following format:

drive:path\filename.SQL

If your path entry does not exist at runtime, iFIX ODBC generates an error message. This is because it tries to send back-up data to a file that is assigned no destination path. In this case, if backed-up SQL commands and data are stored in a file, it cannot be used in restoring data. The SQL system task does not support the following characters in backup file names:

, + * = | < > [ ] " : ; ?

Refer to the Backing Up and Restoring Data section for more information on how iFIX ODBC performs backups.

NOTE: For SQT blocks to log to the primary or secondary backup files, you must select the Enable BackUp checkbox found on the Advanced tab. You must do this for each SQT block you want to utilize backup files.

Database ID – defines the default location for both SQL commands and the data for SQL Trigger blocks. The Database ID is the ODBC data source name specified during ODBC setup for the relational database.

    If you leave this field blank, you can define a Database ID in each SQL Trigger block instead. Refer to the Using Multiple Relational Database Support section for more information on connecting to several relational databases simultaneously.

SQL cmd table – identifies the name of the SQL Library Table that contains the SQL commands. The default name is SQLLIB. However, the table name can have between 1 and 31 characters (inclusive). Refer to the Installing and Configuring Data Sources section for more information on the SQL Library Table.

Error log table – identifies the name of the error log table to which the SQL task sends error messages. If an SQL transaction fails, an entry is made to this table, providing useful information for debugging SQL transactions.

    The default name for the error log table is SQLERR. However, the table can have between 1 and 31 characters (inclusive).

    NOTE: Completing the error log table field is optional. If no table name is entered, the application does not record error messages to the relational database.

Task Sleep Interval – determines how often the SQL task processes the SQT blocks in the database. Be sure to enter a time that is sufficient to monitor your application. Valid entries are 0 to 99 seconds. The default is 5 seconds.

    Once you have configured the SQL task for your application, the next step is to configure the SQL chains in the iFIX database.

See Also

How Do I...