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

AVEVA™ Plant SCADA

Use a Transaction

  • Last UpdatedSep 16, 2025
  • 1 minute read

You can use a database transaction for more sophisticated database operations. A database transaction allows you to execute a series of SQL commands and then either commit the changes to the database, or 'roll back' (cancel) the changes, for example:

SQLBeginTran(hSQL); ! Begin the transaction

SQLExec(hSQL, "UPDATE recipe SET water = '12' WHERE NAME = 'Bread'");

SQLExec(hSQL, "UPDATE recipe SET milk = '1' WHERE NAME = 'Bread'");

IF . . . THEN

SQLCommit(hSQL); ! Commit the transaction

ELSE

SQLRollBack(hSQL);! Cancel the transaction

END

Check the ODBC-compatibility level of your database driver if you cannot use transactions.

See Also

Express Dates and Times in SQL

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