Appendix: Built-in Scripting Language Examples As used in a Math worksheet: DBCursorNext Moves the cursor to the next row in a SQL result set and copies that row's values to the mapped tags. If there is no next row — that is, if the current row is the last — then the function returns an error code and doesn't change the mapped tags. 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. Syntax DBCursorNext( numCur , " optStrErrorTag " ) numCur The cursor handle of the result set. The cursor handle is returned by DBCursorOpen or DBCursorOpenSQL .
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 In case of error, returns a negative number. Otherwise, returns 0. Examples As used in a Math worksheet: DBCursorOpen Selects a set of rows and columns in a database table, initializes the cursor at the first row of the result set, copies that row's values to mapped tags, and then returns a cursor handle that can be referenced by other DB/ERP functions. 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 625 Tag Name Expression nErrorCode DBCursorMoveTo( nCursor, 4 ) // Moves the cursor to the fourth row of the result set and copies those values.
Function Group Execution Windows Embedded Thin Client DBCursorClose Database/ERP Synchronous Supported Supported Supported Group Execution Windows PC Windows CE Thin Client DB/ERP Synchronous Supported Supported Supported Tag Name Expression nErrorCode DBCursorNext( nCursor ) Function Group Execution Windows Embedded Thin Client DBCursorOpen Database/ERP Synchronous Supported Supported Supported