CeBeginTransaction (EDB) (Windows CE 5.0)
This function is used to begin a transaction.
This function does not work with CEDB databases. For more information about CEDB, see CEDB Reference.
BOOL CeBeginTransaction(HANDLEhSession,CEDBISOLATIONLEVELisoLevel);
Parameters
- hSession
[in] A handle to the session. This handle must be returned from either the CeCreateSession (EDB) or the CeGetDatabaseSession (EDB) function. - isoLevel
[in] The isolation level to use for this transaction.
Return Values
TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError. The following table lists possible values returned by GetLastError:
Return Value | Description |
---|---|
ERROR_INVALID_PARAMETER | Indicates that isoLevel is not a supported value. |
ERROR_INVALID_HANDLE | Indicates that hSession is NULL or equal to INVALID_HANDLE_VALUE. |
ERROR_ALREADY_EXISTS | Indicates that the session is already in a transaction. |
Remarks
Once a transaction is changed, all changes to all databases that were opened with the same session will not be committed or rolled back until you call the CeEndTransaction (EDB) function.
If the session is already in a transaction, this function fails because it is not possible to create a nested transaction in which one transaction contains another transaction.
EDB supports the following transaction isolation levels:
- CEDB_ISOLEVEL_DEFAULT or CEDB_ISOLEVEL_READCOMMITTED
- CEDB_ISOLEVEL_REPEATABLEREAD
- CEDB_ISOLEVEL_SERIALIZABLE
Requirements
OS Versions: Windows CE 5.0 and later.
Header: Windbase.h.
Link Library: Coredll.lib.
See Also
CeCreateSession (EDB) | CeGetDatabaseSession (EDB) | CeEndTransaction (EDB)
Send Feedback on this topic to the authors