Last modified: March 09, 2015

Applies to: Windows | Windows Server

The JET_SESID data type contains a handle to the session to use for a call to the JET API.


Data Types


Either NULL or JET_sesidNil can be used to indicate an invalid session handle.


A session is the transaction context of the database engine. It can be used to begin, commit, or abort transactions that affect the visibility and durability of changes that are made by this or other sessions.

A transaction can be started using JetBeginTransaction. A session may be created using JetBeginSession. The maximum number of sessions that can be created at any one time is controlled by JET_paramMaxSessions, which can be configured by means of JetSetSystemParameter.

A session is explicitly ended by a call to JetEndSession or implicitly ended by a call to JetTerm.

Each session can only be used by one thread at a time. In addition, the default behavior of the engine is to restrict the use of a session to the same thread from the time the first call to JetBeginTransaction is made until the time when the matching call to JetCommitTransaction or JetRollback is made. This behavior can be changed to remove this second restriction by setting a custom session context using JetSetSessionContext and JetResetSessionContext.



Requires Windows Vista, Windows XP, or Windows 2000 Professional.


Requires Windows Server 2008, Windows Server 2003, or Windows 2000 Server.


Declared in Esent.h.

See Also