Appendix: Built-in Scripting Language Syntax DBUpdate( strDBConn , strTable , strValues , strColumns , optStrCondition , " optStrErrorTag " ) strDBConn The name of the database connection. Connections are configured in the Database/ERP folder in the Project Explorer . strTable The name of the table in the database. strValues A string that lists the values to be written to the columns. This list of values should be comma-delimited, and string values must be enclosed in single quotes. strColumns A string that lists the columns into which the values will be written. This list of column names should be comma-delimited and in the same order as the values specified by strValues .
optStrCondition A string that specifies which rows of the table to select. This is equivalent to the SQL WHERE clause, and the string should follow the same syntax. This is an optional parameter. If no rows are specified, then all rows of the table will be selected. optStrErrorTag The name of a String tag that will receive detailed error messages, if errors occur during runtime. Note: The tag name must be enclosed in quotes, as shown in the syntax diagram, or else the project will try to get the value of the named tag. This is an optional parameter. Returned value Returns the number of rows updated. In case of error, returns a negative number. Examples As used in a Math worksheet:
SyncAlarm Synchronizes the alarm database. Syntax SyncAlarm( optStrStartDate , optStrEndDate ) optStrStartDate String with the start date. If this parameter is not specified, then the current date is used. optStrEndDate Page 634 InduSoft Web Studio Tag Name Expression Tag DBUpdate( "DB1", "Table1", "'X'", "Column2", "Column1 = 1", "TagError" ) // In Table1 of DB1, for all rows where Column1 equals 1, writes "X" to Column2. Function Group Execution Windows Embedded Thin Client SyncAlarm Database/ERP Asynchronous Supported Supported Executed on Server