About Rollback and commit in Gridview Deleting Event
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 */
精彩评论