omron — Database/ERP worksheet

Background Tasks Status codes for external database operations • Completed field: Enter the name of a numeric tag that will be toggled when database commands are successfully executed. • Error Message field: Enter the name of a string tag that will receive detailed error messages, if errors occur during runtime. • Connection combo-box: Click to select a connection to the target database. All available connections are listed, as configured with the Database Connection dialog described above . • Type combo-box: Click to specify how the result set will be selected for the worksheet: • Table : Enter a table name and an optional filter condition.

(The filter condition is equivalent to the SQL "Where" clause.) All rows of the table that match the filter condition are selected. • SQL : Enter a custom SQL "Select" statement. Note: For Table , Condition and SQL Statement , you can enter the names of project tags that contain the desired information. This lets you programmatically change the selection during runtime. However, tag names must be enclosed in curly brackets ( {} ) to distinguish them from literal strings. Also, you must release an existing selection before you open a new one; see Close Query below. • Cursor Triggers area… • Select field:

Enter any tag; when the value of the tag changes, a new cursor opens the first row of the result set and copies those values to the tags configured in the worksheet body. • Next field: Enter any tag; when the value of the tag changes, the cursor moves to the next row of the result set and copies those values to the tags configured in the worksheet body. • Advanced button: Click to open the Advanced Cursor Options dialog…

Advanced Cursor Options dialog Page 288 InduSoft Web Studio Status Code Description 4 Result set is empty 3 Cursor released and query successfully closed 2 Beginning of result set reached, usually while moving cursor to previous row 1 End of result set reached, usually while moving cursor to next row 0 No errors; status normal -1 Error while connecting to specified database (see Connection below) -2 Error while selecting result set -3 Error while moving cursor to next row (see Next trigger below) -4 Error while moving cursor to previous row (see Previous trigger below) -5 Error while closing the query (see Close Query trigger below) -6 Error while inserting rows in result set (see Insert trigger below) -7 Error while updating result set (see Update trigger below) -8 Error while deleting result set (see Delete trigger below)