dbRollbackTransaction()

To end a transaction, no changes are made.

Synopsis

int dbRollbackTransaction(dbConnection connection);

Parameters

Parameter Meaning
connection Connection reference supplied by dbOpenConnection()

Return Value

The return value is an error code, 0 indicates successful execution of the operation. With other values detailed error information can be retrieved using dbGetError().

Errors

In the event of an invalid connection or missing preceding dbBeginTransaction() or if transactions are not supported by the data source, an error is returned.

Description

To end a transaction dbCommitTransaction() or dbRollbackTransaction() is called. With dbRollbackTransaction() all the changes made to the data source during the course of the transactions (i.e. since the call of dbBeginTransaction) are cancelled.Depending on the data source a new transaction may have been implicitly started (i.e. without calling dbBeginTransaction()).

Example

see dbBeginTransaction()

Assignment

ADO and Qt, Database functions

Availability

CTRL