Sunday 18 August 2013

Commit and Rollback in Oracle

Before a program is terminated by the c exit function and if no error occurred, database modifications through embedded insert, update, and delete statements must be committed. This is done by using the embedded SQL statement
EXEC SQL COMMIT WORK RELEASE;
If a program error occurred and previous non-committed database modifications need to be
undone, the embedded SQL statement
EXEC SQL ROLLBACK WORK RELEASE;
has to be specified in the respective error handling routine of the Pro*C program.

No comments:

Post a Comment