| Previous | Next |
| hrTooManyOpenTables | hrObjectDuplicate |
hrIllegalOperation
The object and state that matter
hrIllegalOperation means the requested API is not supported for this table kind, cursor mode, or object state.
This is the legacy Directory Service backup/restore HRESULT form of JET_errIllegalOperation (0xC8000520).
The key comparison is: hrInvalidOperation is a broader state error; this code is table-operation specific. The first useful observation is to capture table type, current index, open flags, transaction state, and exact operation. This evidence distinguishes name collisions, stale table handles, active users, locks, and structural dependencies.
Minimum useful trace
- Code-specific observation: capture table type, current index, open flags, transaction state, and exact operation.
- the table/object metadata and normalized name; associate it with this result rather than with a later generic exception.
- all JET_TABLEID owners, open modes, transactions, and current indexes; associate it with this result rather than with a later generic exception.
- the exact schema migration step and whether a previous attempt committed.
How to avoid a false diagnosis
hrDensityInvalid | a table or index density setting falls outside the engine-supported range |
|---|---|
hrInvalidObject | the resolved object type or state is incompatible with the requested operation |
hrContainerNotEmpty | a container-level delete or structural change was requested while dependent objects remain |
The ESE objects in play
| Diagnostic layer | table and schema-object ownership, locks, and structural dependencies |
|---|---|
| Typical API surface | JetOpenTable, JetCreateTableColumnIndex, JetDeleteTable, and schema enumeration APIs |
| Code-specific condition | the requested API is not supported for this table kind, cursor mode, or object state |
| First corrective direction | choose the API supported by the object type rather than trying to coerce the table state |
A JET_TABLEID is a cursor-like handle owned by a session, not a persistent table identifier. Schema changes commonly require exclusive access and a specific transaction state.
Safe recovery sequence
- Freeze the failing request context and record
0xC8000520, the Jet API name, and the current instance/session ownership. - Verify the code-specific precondition: capture table type, current index, open flags, transaction state, and exact operation.
- Apply the targeted fix: choose the API supported by the object type rather than trying to coerce the table state.
- Before retrying the operation, reconcile object definition, exclusive-access state, and migration version.
Actions that can hide or worsen the problem
- Do not force a schema mutation while table users remain active.
- Do not skip a migration merely because an object with the same name exists.
Technical references
- JetOpenTable.
- JetCreateTableColumnIndex
- ESE functions
- JET error codes
- Microsoft: JET_ERR enumeration
Looking for a different code? Search another status or error code.