开发者

About Rollback and commit in Gridview Deleting Event

开发者 https://www.devze.com 2023-03-27 04:22 出处:网络
When writing gridview Event, We must write the Commitand Rollback inevent. Can not run the Eventif don\'t writeCommit. I w开发者_如何学Pythonant to know what for writingcommit and rollback???what a di

When writing gridview Event, We must write the Commit and Rollback in event. Can not run the Event if don't write Commit. I w开发者_如何学Pythonant to know what for writing commit and rollback???what a differences between commit and rollback????


COMMIT : To make the changes done in a transaction permanent issue the COMMIT statement. The syntax of COMMIT Statement is COMMIT [WORK] [COMMENT ‘your comment’]; WORK is optional. COMMENT is also optional, specify this if you want to identify this transaction in data dictionary DBA_2PC_PENDING.

Example : insert into emp (empno,ename,sal) values (101,’Abid’,2300); commit;

ROLLBACK : To rollback the changes done in a transaction give rollback statement. Rollback restore the state of the database to the last commit point.

Example : delete from emp; rollback; /* undo the changes */

0

精彩评论

暂无评论...
验证码 换一张
取 消