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

AVEVA™ InTouch HMI

SQLCommit() function

  • Last UpdatedJun 17, 2024
  • 1 minute read

The SQLCommit() function defines the end of a transaction set. After the SQLTransact() function runs, all subsequent all SQL statements within the transaction set are not committed to the database until the SQLCommit() function runs successfully.

Note: Use caution when writing QuickScripts that include the SQLCommit() function. Processing time increases with the number of SQL statements in a transaction set.

Category

SQL

Syntax

[ResultCode=]SQLCommit(ConnectionID)

Argument

ConnectionID

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

Example

This example script includes a transaction set that makes three database inserts.

ResultCode = SQLTransact(ConnectionID);

ResultCode = SQLInsertPrepare(ConnectionID, TableName, BindList, StatementID);

ResultCode = SQLInsertExecute(ConnectionID, BindList, StatementID);

ResultCode = SQLInsertExecute(ConnectionID, BindList, StatementID);

ResultCode = SQLInsertExecute(ConnectionID, BindList, StatementID);

ResultCode = SQLInsertEnd(ConnectionID, StatementID);

ResultCode = SQLCommit(ConnectionID);

See Also

SQLRollback(), SQLTransact(), SQLCommit()

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