Example: lrd_rollback

In the following example, the lrd_rollback function rolls back the transaction.

lrd_stmt(Csr10, "SAVEPOINT FM_1", -1, 1 /*Deferred*/, 1 /*Dflt Ora Ver*/, 0);
lrd_exec(Csr10, 0, 0, 0, 0, 0);
lrd_open_cursor(&Csr11, Con1, 0);
lrd_stmt(Csr11, "insert into DEPT values (14,'MKTG') ", -1, 1 /*Deferred*/, 1 /*Dflt Ora Ver*/, 0);
lrd_exec(Csr11, 0, 0, 0, 0, 0);
lrd_stmt(Csr10, "ROLLBACK TO FM_1", -1, 1 /*Deferred*/, 1 /*Dflt Ora Ver*/,0);
lrd_exec(Csr10, 0, 0, 0, 0, 0);
lrd_stmt(Csr10, "ROLLBACK", -1, 1 /*Deferred*/, 1 /*Dflt Ora Ver*/, 0);
lrd_exec(Csr10, 0, 0, 0, 0, 0);
lrd_close_all_cursors(Con1);
lrd_rollback(0, Con1, 0);