18.01.2015 Views

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

Technical Reference Manual - InduSoft

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Appendix: Built-in Scripting Language<br />

This is an optional parameter; if no value is specified, then only the first row of the result set will<br />

be copied.<br />

optStrErrorTag<br />

The name of a String tag that will receive detailed error messages, if errors occur during<br />

runtime.<br />

Note: The tag name must be enclosed in quotes, as shown in the syntax<br />

diagram, or else the project will try to get the value of the named tag.<br />

This is an optional parameter.<br />

Returned value<br />

This function returns the total number of rows in the result set. If an error occurs, then it returns a negative<br />

number.<br />

Please note this is the value returned by the function itself; the database values are copied to the array tags<br />

specified by strTags.<br />

Notes<br />

This feature emulates SQL (Structured Query Language) database operations. You should be familiar with<br />

how SQL statements are formed and executed before you use this feature.<br />

Examples<br />

DBSelect( "DB1", "Table1", "Array1,Array2", "Column1,Column2", "", "" )<br />

DBSelect( "DB1", "Table1", "Array1,Array2", "Column1,Column2", "Column2 < Column1",<br />

"Column1", 4, "TagError" )<br />

DBUpdate<br />

Selects a result set and then writes the same value to all rows of a specified column. (This function is<br />

equivalent to a SQL UPDATE statement.)<br />

Function Group Execution Windows Embedded Thin Client<br />

DBUpdate Database/ERP Synchronous Supported Supported Supported<br />

Note: This feature emulates SQL (Structured Query Language) database operations. You should be<br />

familiar with how SQL commands are formed and executed before you use this feature.<br />

Syntax<br />

DBUpdate( strDBConn, strTable, strValues, strColumns, optStrCondition,<br />

"optStrErrorTag" )<br />

strDBConn<br />

strTable<br />

strValues<br />

The name of the database connection. Connections are configured in the Database/ERP folder in<br />

the Project Explorer.<br />

The name of the table in the database.<br />

Page 752<br />

<strong>InduSoft</strong> Web Studio

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!