Defenition:-
a rollback is an operation which returns the database to some previous state. Rollbacks are important for database integrity,
because they mean that the database can be restored to a clean copy even after erroneous operations are performed.
. A transaction begins with the execution of a SQL-Data statement when there is no current transaction. All subsequent SQL-Data statements until COMMIT or ROLLBACK become part of the transaction. Execution of a COMMIT Statement or ROLLBACK Statement completes the current transaction.
COMMIT Statement
The COMMIT Statement terminates the current transaction and makes all changes under the transaction persistent. It commits the changes to the database. The COMMIT statement has the following general format:
COMMIT [WORK]
WORK is an optional keyword that does not change the semantics of COMMIT.
ROLLBACK Statement
The ROLLBACK Statement terminates the current transaction and rescinds all changes made under the transaction. It rolls back the changes to the database. The ROLLBACK statement has the following general format:
ROLLBACK [WORK]
The major link for refferring these is:
http://www.eggheadcafe.com/tutorials/aspnet/6a8ef7d5-840e-4629-b53a-1a40e7db601f/using-try--catch-to-roll.aspx
Click to View in Detail
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment