CeBeginTransaction (EDB)
A version of this page is also available for
4/8/2010
This function begins a transaction.
Syntax
BOOL CeBeginTransaction(
HANDLE hSession,
CEDBISOLATIONLEVEL isoLevel
);
Parameters
- hSession
[in] Handle to the session. This handle must be returned from either the CeCreateSession (EDB) or the CeGetDatabaseSession (EDB) function.
- isoLevel
[in] Isolation level to use for this transaction.
Return Value
TRUE indicates success. FALSE indicates failure. To get extended error information, call GetLastError. The following table shows possible values.
Return Value | Description |
---|---|
ERROR_ALREADY_EXISTS |
The session is already in a transaction. |
ERROR_INVALID_HANDLE |
The hSession parameter is set to NULL or an INVALID_HANDLE_VALUE. |
ERROR_INVALID_PARAMETER |
The value of isoLevel is not supported. |
ERROR_NOT_ENOUGH_MEMORY |
There was not enough memory available to create the volume. |
Remarks
Once a transaction is changed, all changes to all databases that were opened with the same session are not 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.
EDB supports the following transaction isolation levels:
- CEDB_ISOLEVEL_DEFAULT or CEDB_ISOLEVEL_READCOMMITTED
- CEDB_ISOLEVEL_REPEATABLEREAD
- CEDB_ISOLEVEL_SERIALIZABLE
Requirements
Header | windbase.h |
Library | coredll.lib |
Windows Embedded CE | Windows Embedded CE 6.0 and later |
Windows Mobile | Windows Mobile Version 5.0 and later |
See Also
Reference
EDB Functions
CeCreateSession (EDB)
CeGetDatabaseSession (EDB)
CeEndTransaction (EDB)