大网数据广告活动
磁盘与文件系统

ESE Handles

· 52CE 我爱测

ESE handles are used to create sessions and access databases. They are maintained in a hierarchy, which means that the output from one level is used to access resources at the next level.

Applies to: Windows | Windows Server

ESE Handles

ESE handles are used to create sessions and access databases. They are maintained in a hierarchy, which means that the output from one level is used to access resources at the next level.

The diagram here shows the hierarchy of handles and the corresponding functions that create the handles. Also indicated along with the functions are the handles that are used in the call to create the new handle.

ESE_Documentation_handles2

As shown in the diagram, the instance is the root handle and the level at which the database is recovered in the event of an unexpected process termination or system shutdown. The instance handle, JET_INSTANCE, is created by JetCreateInstance and JetCreateInstance2. The next level, the session level, is the transaction context of the database engine and the level under which all database operations are performed. The session handle, JET_SESID, is created in the context of the instance in the call to JetBeginSession. The session ID is used in all subsequent calls to access tables and databases. If the instance is being used by more than one thread at a time then each thread must use its own session handle. The database handle is created using the session handle and primarily used to manage the schema of the database, but it can also be used to manage tables inside the database. Database handles can only be used in the session under which they are created. The handle to the database is created in the call to JetCreateDatabase or JetOpenDatabase. Tables are associated with the database ID under which they are created.

The JET_TABLEID data type contains a handle to a database cursor. It is used to scan records, search records or create update and delete records. The table handle is created in the call to JetOpenTable, or JetCreateTable. JetOpenTempTable, JetOpenTempTable2, and JetOpenTempTable3 also create table IDs for temporary tables, and JetCreateTableColumnIndex and JetCreateTableColumnIndex2 return table IDs in the out structure. The columns created within the table each have a unique column identifier or COLUMN_ID. The columns IDs are created in the calls to JetAddColumn, or in calls to JetOpenTempTable, JetOpenTempTable2, or JetOpenTempTable3 for temporary tables. Column IDs may also be retrieved for a given column by name with APIs such as JetGetTableColumnInfo.

Source: Microsoft Learn / Windows Win32 documentation by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / Windows Win32 documentation
适用范围
Windows Win32 API · Source date 04/11/2016
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。