Important: |
---|
This is retired content. This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This content may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist. |
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 hSessionparameter is set to NULL or an INVALID_HANDLE_VALUE. |
ERROR_INVALID_PARAMETER |
The value of isoLevelis 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 |