Share this page

# lrd_rollback

Performs a rollback on the database.

    LRDRET lrd_rollback( LRD_CONTEXT *mptContext,LRD_CONNECTION *mptConnection, int miDBErrorSeverity );

mptContext | A pointer to an LRD_CONTEXT structure.
mptConnection | A pointer to an LRD_CONNECTION structure.
miDBErrorSeverity | The Error Severity Levels of a failure in a database routine.

The lrd_rollback function rolls back the current database transaction to the last Savepoint.

For more details refer to the Function Header File lrd.h in the include directory.

## Return Values

See LRD Return Values.

## Parameterization

You cannot use standard parameterization for any arguments in this function.

## Example

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);

Tips to improve your search results... VuGen Function Reference Version 26.1 Function Reference 26.1 All View Local Help Center View Online Help Center Version: