rollback



Summary

#include <dataman/dataman.h>

rollback();

Description

The rollback function terminates a transaction and does not commit any changes to the database from the time start_transaction() was called.

Example

    #include <dataman/dataman.h>

    main(int argc, char *argv[])
    {
            ....
        start_transaction();
            ...
        get(ix1, key) else {
            rollback();        /* couldn't get the key, rollback */
            return;
        }
            ...
        commit() else {
            pause(10,30, "Couldn't commit transaction");
            return;
        }
    }


«previous  next»