ROLLBACK WORK

ROLLBACK WORK


ROLLBACK TRANSACTION Index Level ROOT
Syntax ROLLBACK {WORK | TRANSACTION} {THEN | ELSE statement.block}
Category BASIC
Type Statement
Description Rolls back (or undoes) a transaction

This operation atomically undoes all updates made since the last "begin work" command.  All locks acquired within the transaction are released.
Options
See Also BEGIN WORK COMMIT TRANSACTION TRANSACTION COMMIT ROLLBACK TRANSACTION TRANSACTION ROLLBACK TRANSACTION ABORT _CP_trans
Example open "myfile" to f1
open "mylog" to f2
begin work
write total on f2,timedate();* create synchronized log
readu total from f1,"total"
if total = 0 then
 rollback work;* Cannot do anything
end else
total = total - 1
write total on f1,"total"
commit work else print "Could not update"
end
Warnings
Compatibility D3 7.0
ROLLBACK TRANSACTION Index Level ROOT