Download Print this page

HEIDENHAIN MANUALplus 620 Technical Manual page 1623

Hide thumbs Also See for MANUALplus 620:

Advertisement

Concluding the
transaction
January 2012
Be sure to conclude every transaction. This way the resources assigned in the
SQL server are released for the result set.
After concluding the transaction with SQL COMMIT, all changes are
transferred from the result set into the table.
To cancel all changes, conclude the transaction with SQL ROLLBACK.
Once transferred, these changes cannot be undone. After the transaction has
been completed, the rows locked during the selection are unlocked.
The transaction to be completed is identified by the handle. After the
transaction has been completed successfully, the handle becomes invalid and
cannot be used for accessing data any longer.
The result of the SQL COMMIT function will not be 0 if the edited data could
not be transferred into the table file. This happens when edited rows were not
locked during the selection and are locked by third parties at the time of
commitment. The SQL server first checks whether all edited rows may be
rewritten before it transfers the first change. The isolation of accesses
ensures that the effects of the transaction are invisible to others until the
transaction is committed. It may, however, happen that errors occur while a
file is being accessed.
The SQL ROLLBACK function enables you to remove all rows, except for the
indicated row, from the result set by defining an index. As a result, the
changes made to the removed rows are canceled. This is especially useful if
you first select and, as a consequence, lock more than one row, but then
decide that you want to edit only one row. The other rows can then
immediately be released. The handle remains effective until the transaction
has been completed for all rows. If no index or an invalid index has been
defined, the entire transaction is completed. The result of the function does
not equal 0 if an error has occurred.
8.12 Tables
1623

Advertisement

loading