Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ InTouch HMI

SQLUpdateCurrent() function

  • Last UpdatedJun 17, 2024
  • 1 minute read

The SQLUpdateCurrent() function updates the current row of the logical table using InTouch tags mapped to the table fields by the Bind List specified in SQLSelect() or SQLExecute() function statements. If there are rows that are identical to the current row, all rows are updated.

Up to 54 identical records can be updated at once. If there are too many identical rows to be updated in SQL Access, the SQLUpdateCurrent() function returns an error. The error message is similar to, "Microsoft Cursor Engine: Key column information is insufficient or incorrect. Too many rows were affected by update."

To avoid this error, create a unique key field in the table that makes each row unique. It is strongly recommended that all tables used by SQL Access have a unique key. For a table without a key, it is recommended that a field of type AutoNumber (Access) or an integer field used as the row Identity (SQL Server) be used as the primary key so that SQLUpdateCurrent() function updates only one row at a time. This primary key field does not have to be included in a Bind List.

Category

SQL

Syntax

[ResultCode=]SQLUpdateCurrent(ConnectionID);

Argument

ConnectionID

Name of a memory integer tag that holds the number (ID) assigned by the SQLConnect() function to each database connection.

Example

ResultCode=SQLUpdateCurrent(ConnectionID);

See Also

SQLConnect()

In This Topic
TitleResults for “How to create a CRG?”Also Available in