| Previous | Next |
| hrInvalidParameter | hrOutOfMemory |
hrInvalidDatabaseId
Locate the failure in the Jet call chain
hrInvalidDatabaseId means the JET_DBID no longer identifies an open database in the supplied session.
This is the legacy Directory Service backup/restore HRESULT form of JET_errInvalidDatabaseId (0xC80003F2).
The key comparison is: hrDatabaseNotFound is a name/path lookup failure; this result is a stale or foreign handle problem. The first useful observation is to trace where the database ID was returned, closed, detached, or crossed a session boundary. This evidence separates file identity, attachment, open-handle ownership, lock state, and structural validity.
The ESE objects in play
| Diagnostic layer | database file, attachment state, JET_DBID ownership, and database lifecycle |
|---|---|
| Typical API surface | JetCreateDatabase, JetAttachDatabase, JetOpenDatabase, JetCloseDatabase, and JetDetachDatabase |
| Code-specific condition | the JET_DBID no longer identifies an open database in the supplied session |
| First corrective direction | reopen the database through the owning session and invalidate cached IDs when close or detach succeeds |
Creating an empty file is not a valid substitute for a missing or corrupted ESE database. Attachment is an instance relationship; opening a database returns a session-scoped database ID.
Questions the logs must answer
- open tables, transactions, maintenance, and recovery activity using the database; associate it with this result rather than with a later generic exception.
- the canonical database path and file identity.
- the instance attachment list plus every session-scoped JET_DBID.
Response and verification
- Freeze the failing request context and record
0xC80003F2, the Jet API name, and the current instance/session ownership. - Apply the targeted fix: reopen the database through the owning session and invalidate cached IDs when close or detach succeeds.
- Before retrying the operation, reconcile attachment, open/closed state, file identity, and database header status.
Distinguishing signals
hrInvalidDatabase | the selected file is not a usable ESE database for this operation |
|---|---|
hrDatabaseCorrupted | the database cannot be trusted as a coherent ESE file or is unavailable in a way reported as corruption |
hrDatabaseNotFound | a valid database name or path did not resolve to an attached or existing database |
Actions that can hide or worsen the problem
- Do not create an empty database at the expected path as a substitute for the missing or damaged artifact.
- Do not force detach or delete while owners and recovery state are unknown.
Technical references
Looking for a different code? Search another status or error code.
