次の方法で共有


CeBeginTransaction (EDB) (Windows Embedded CE 6.0)

1/6/2010

This function begins a transaction.

This function does not work with CEDB databases. For more information about CEDB, see CEDB Reference.

Syntax

BOOL CeBeginTransaction(
  HANDLE hSession,
  CEDBISOLATIONLEVEL isoLevel
);

Parameters

  • 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

See Also

Reference

EDB Functions
CeCreateSession (EDB)
CeGetDatabaseSession (EDB)
CeEndTransaction (EDB)