Undoing database updates since last begin markerΒΆ
rollback() |
Undo database updates since last begin marker |
SYNTAX
rollback()
The rollback command undoes all updates made to the database since the last begin marker was written. Transaction logging must be turned on. This is performed automatically within Sculptor programs unless specifically turned off by setting the Sculptor system variable sys.Logging to OFF within the program.
This function returns 0 if successful or -1 if it fails. It should never fail with a Sculptor file, but an option does exist in ODBC to return an error when SQL databases are used.
See begin() for further details of transaction logging and the recovery program.
NOTES
This function was introduced in Sculptor V. 5.1.0. Previously it was a command, rollback. That command, now obsolescent, has been renamed rollback_mark.
EXAMPLE
if (UpdateFiles() = OKAY) then commit() else rollback()
RELATED TOPICS |