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 />

Syntax<br />

DBCursorNext( numCur, "optStrErrorTag" )<br />

numCur<br />

The cursor handle of the result set. The cursor handle is returned by DBCursorOpen or<br />

DBCursorOpenSQL.<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 />

In case of error, returns a negative number. Otherwise, returns 0.<br />

Examples<br />

As used in a Math worksheet:<br />

Tag Name<br />

Expression<br />

nErrorCode DBCursorNext( nCursor )<br />

DBCursorOpen<br />

Selects a set of rows and columns in a database table, initializes the cursor at the first row of the result set,<br />

copies that row's values to mapped tags, and then returns a cursor handle that can be referenced by other<br />

DB/ERP functions.<br />

Function Group Execution Windows Embedded Thin Client<br />

DBCursorOpen 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 />

DBCursorOpen( strDBConn, strTable, optStrCondition, optStrColumns, optStrTags, optStrOrder,<br />

"optStrErrorTag" )<br />

strDBConn<br />

strTable<br />

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

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

optStrCondition<br />

A string specifying which rows of the table to select. This is equivalent to the SQL WHERE<br />

clause, and the string should follow the same syntax.<br />

This is an optional parameter. If no rows are specified, then all rows of the table will be selected.<br />

<strong>InduSoft</strong> Web Studio Page 743

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

Saved successfully!

Ooh no, something went wrong!