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

AVEVA™ InTouch HMI

Retrieve data from a table

  • Last UpdatedJun 17, 2024
  • 1 minute read

You can use a set of SQL functions in scripts to retrieve data from a database and write the values to InTouch tags.

  • The SQLSelect() function retrieves information from a table and places this information in the form of records into a temporary Results Table created in memory.

  • The SQLGetRecord() function retrieves the record specified by RecordNumber from the current selection buffer.

  • The SQLNumRows() function returns the number of table rows that met the criteria specified in a previous SQLSelect() function.

  • The SQLFirst() function retrieves the first record of the Results Table created by the last SQLSelect() function.

  • The SQLNext() function retrieves the next record of the Results Table created by the last SQLSelect() function.

  • The SQLPrev() function retrieves data from the previous row of the logical table and fetch values from that row into InTouch tags.

  • The SQLLast() function retrieves the last row of the logical table and fetch values from that row into InTouch tags.

  • The SQLEnd() function frees memory that stores the contents of the Results Table associated with ConnectionId.

The SQLFirst(), SQLPrev(), SQLNext(), SQLLast(), and SQLGetRecord() functions retrieve data from specified rows of the logical table and save it as InTouch tag values. If a field is NULL, the value of the associated InTouch tag is set to zero or a zero-length string depending on whether the tag is of analog or message type.

If a string in the database is greater than 131 characters, only the first 131 characters are copied from the database to the associated InTouch message tag.

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