omron — DBUpdate

Appendix: Built-in Scripting Language strColumns A comma-delimited list of which columns in the database table to select. The list order should correspond to the list in strTags. To select all of the columns in the table, in their original order, give this parameter an empty string ( "" ). strCondition A statement specifying which rows in the database table to select. This is equivalent to the SQL WHERE clause and must follow the same syntax. To select all of the rows in the table, give this parameter an empty string ( "" ). strOrder A statement specifying the order in which the rows should be sorted. This is equivalent to the SQL ORDER BY clause and must follow the same syntax.

To leave the rows in their original order, give this parameter an empty string ( "" ). optNumMaxRows The maximum number of rows to be copied. In most cases, to copy all of the rows, specify a number greater than the expected number of rows in the result set. This is an optional parameter; if no value is specified, then only the first row of the result set will be copied. 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 This function returns the total number of rows in the result set. If an error occurs, then it returns a negative number. Please note this is the value returned by the function itself; the database values are copied to the array tags specified by strTags. Notes This feature emulates SQL (Structured Query Language) database operations. You should be familiar with how SQL statements are formed and executed before you use this feature.

Examples DBSelect( "DB1", "Table1", "Array1,Array2", "Column1,Column2", "", "" ) DBSelect( "DB1", "Table1", "Array1,Array2", "Column1,Column2", "Column2 "Column1", 4, "TagError" ) DBUpdate Selects a result set and then writes the same value to all rows of a specified column. (This function is equivalent to a SQL UPDATE statement.) Note: This feature emulates SQL (Structured Query Language) database operations. You should be familiar with how SQL commands are formed and executed before you use this feature. InduSoft Web Studio Page 633 Function Group Execution Windows Embedded Thin Client DBUpdate Database/ERP Synchronous Supported Supported Supported