Transaction Work
If a database has some form of transaction logging, then a series of data maintenance statements may be performed in a single transaction. There are three transaction work statements:
BEGIN WORK
This must be issued before a transaction sequence starts.
COMMIT WORK
This closes the transaction sequence and commits all the changes to the database.
ROLLBACK WORK
This closes the transaction sequence, ignoring the changes to the database. However, it does not ignore all statements. If database definition statements that alter the number and names of tables, the number and names of columns, data-types and indexes can be executed correctly, they are committed and are not rolled back.
During a dbaccess/isql session, if any
DDL statements are issued (eg, a CREATE TABLE
statement) or DML on databases with logging, and no
BEGIN WORK transaction has been either
started and completed around such statements,
dbaccess/isql will prompt the user with
the following menu options on leaving the session:
Commit Rollback
Once the required option has been chosen, the DBMS will be informed to act accordingly and the session will be terminated.