| Previous | Next |
| hrTooManyIndexes | hrRecordDeleted |
hrTooManyKeys
The object and state that matter
hrTooManyKeys means an index definition contains more key segments than the engine accepts.
This is the legacy Directory Service backup/restore HRESULT form of JET_errTooManyKeys (0xC80003F8).
The key comparison is: hrIndexInvalidDef covers other malformed definitions; this result isolates segment count. The first useful observation is to preserve the complete key definition string, segment order, sort direction, and conditional columns. This evidence separates index schema, current-index cursor state, key construction, and duplicate data.
Minimum useful trace
- 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.
How to avoid a false diagnosis
hrTooManyIndexes | a table schema attempted to exceed the supported number of indexes |
|---|---|
hrIndexCantBuild | ESE cannot construct the requested clustered index from the existing table and definition |
hrNullKeyDisallowed | an index definition or inserted row produces a null key where the index contract forbids it |
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 contains more key segments than the engine accepts |
| First corrective direction | reduce key segments or replace part of the key with filtering in application logic |
Index schema and runtime key-building state are separate diagnostic layers. Key bytes depend on segment order, column representation, collation, null rules, and sort direction.
Safe recovery sequence
- Freeze the failing request context and record
0xC80003F8, the Jet API name, and the current instance/session ownership. - Apply the targeted fix: reduce key segments or replace part of the key with filtering in application logic.
- Before retrying the operation, reconcile index definition, selected cursor index, and key or uniqueness outcome.
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.
