MimerBeginTransaction

Starts a transaction.

This routine only needs to be called if two or more database operations should participate in the transaction. (If the transaction consists of one single operation, simply use the auto-commit functionality, which is the default. See Transactions.)

Parameters

int32_t MimerBeginTransaction (

            MimerSession sessionhandle,

            int32_t transoption)

sessionhandle

in

A handle returned by MimerBeginSession[C|8], identifying the session.

transoption

in

A bit mask of options identifying the characteristics of the transaction. The following values specifies a transaction being read/write, or read only:

MIMER_TRANS_READWRITE (0x0)

MIMER_TRANS_READONLY (0x1)

A value of 0 will indicate MIMER_TRANS_READWRITE.

Returns

A negative value indicating an error, or zero if successful.

Return value

Description

MIMER_SUCCESS

Success.

MIMER_HANDLE_INVALID

The sessionhandle parameter was not recognized as a handle.

MIMER_OUTOFMEMORY

If not enough memory could be allocated.

Other value < 0

Any of the server error codes listed in Return Codes.

Notes

This routine interacts with the database server.

Not Micro API compatible.