- Web Studio Help
- Appendix: Built-in Scripting Language
- Database/ERP functions
Database/ERP functions
These functions are used interact with external databases and ERP systems using SQL-like commands.
- DBCursorClose
Closes the cursor and releases the result set. - DBCursorColumnCount
Gets the total number of columns in a SQL result set. - DBCursorColumnInfo
Gets information about a column in a SQL result set. The column is specified by number rather than by name, so this function can be used to retrieve unknown column names. - DBCursorCurrentRow
Returns the row number of the current row (i.e., the cursor position) in a SQL result set. - DBCursorGetValue
Gets the value of the specified column of the current row (i.e., the cursor position) in a SQL result set. - DBCursorMoveTo
Moves the cursor to the specified row in a SQL result set and copies that row’s values to the mapped tags. If the specified row doesn’t exist — that is, if it’s outside the range of the result set — then the function returns an error code and doesn’t change the mapped tags. - 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. - 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. - DBCursorOpenSQL
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. (This function is equivalent to a SQL SELECT statement.) - DBCursorPrevious
Moves the cursor to the previous row of the result set and copies that row’s values to the mapped tags. If there is no previous row — that is, If the current row is the first — then the function returns an error code and doesn’t change the mapped tags. - DBCursorRowCount
Gets the total number of rows in a SQL result set. - DBDelete
Deletes selected rows from a database table. (This function is equivalent to a SQL DELETE statement.) - DBExecute
DBExecute is a built-in scripting function that executes a custom SQL statement on an external database. If the statement is a query (e.g., SELECT), then the database values are copied to specified array tags. - DBInsert
Inserts one new row into a database table. (This function is equivalent to a SQL INSERT statement.) - DBSelect
DBSelect is a built-in scripting function that selects a result set from an external database (equivalent to a SQL SELECT statement), maps the columns to array tags in your project, and copies the values from the result set to the array tags. - 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.) - SyncAlarm
Synchronizes the alarm database. - SyncAlarmStatus
Returns the status of a previously called SyncAlarm function. - SyncEvent
Synchronizes the event database. - SyncEventStatus
Returns the status of a previously called SyncEvent function. - SyncTrend
Synchronizes the trend database. - SyncTrendStatus
Returns the status of a previously called SyncTrend function.
Parent topic: Appendix: Built-in Scripting Language
InduSoft Web Studio -Technical Reference