| Previous | Next |
| hrIndexInUse | hrNotInTransaction |
hrNullKeyDisallowed
Where the operation crossed the contract
hrNullKeyDisallowed means an index definition or inserted row produces a null key where the index contract forbids it.
This is the legacy Directory Service backup/restore HRESULT form of JET_errNullKeyDisallowed (0xC800041D).
The key comparison is: hrNullInvalid is a column nullability rule; this result is specifically about index key construction. The first useful observation is to identify which key segment is null and the index flags controlling null handling. This evidence separates index schema, current-index cursor state, key construction, and duplicate data.
Reconstruct the engine state
- Code-specific observation: identify which key segment is null and the index flags controlling null handling.
- the current index plus every JetMakeKey segment and grbit; associate it with this result rather than with a later generic exception.
- the encoded key and existing row when uniqueness is involved; associate it with this result rather than with a later generic exception.
- the raw index key definition, flags, locale, and conditional columns.
The ESE objects in play
| Diagnostic layer | B-tree index definition, key construction, uniqueness, and current-index cursor state |
|---|---|
| Typical API surface | JetCreateIndex, JetDeleteIndex, JetSetCurrentIndex, JetMakeKey, JetSeek, and JetSetIndexRange |
| Code-specific condition | an index definition or inserted row produces a null key where the index contract forbids it |
| First corrective direction | supply the mandatory key value or choose documented null-index semantics when designing the index |
Key bytes depend on segment order, column representation, collation, null rules, and sort direction. Clustered, primary, and unique properties must be interpreted from the actual index flags.
Repair without destroying evidence
- Freeze the failing request context and record
0xC800041D, the Jet API name, and the current instance/session ownership. - Verify the code-specific precondition: identify which key segment is null and the index flags controlling null handling.
- Apply the targeted fix: supply the mandatory key value or choose documented null-index semantics when designing the index.
- Before retrying the operation, reconcile index definition, selected cursor index, and key or uniqueness outcome.
Do not collapse these codes together
hrNoCurrentIndex | the cursor operation requires an active index but none is selected or available |
|---|---|
hrTooManyIndexes | a table schema attempted to exceed the supported number of indexes |
hrKeyNotMade | a seek or range operation was invoked before a complete search key was constructed |
Actions that can hide or worsen the problem
- Do not drop or rebuild an index before checking uniqueness and table-layout dependencies.
- Do not treat a key-construction or duplicate-key result as database-file corruption.
Technical references
Looking for a different code? Search another status or error code.
