What does HRESULT 0xC800057C (hrIndexNotFound) mean?

 
Previous Next
hrIndexDuplicate hrIndexMustStay

hrIndexNotFound

Where the operation crossed the contract

hrIndexNotFound means the requested index name is valid but absent from the table.

This is the legacy Directory Service backup/restore HRESULT form of JET_errIndexNotFound (0xC800057C).

The key comparison is: hrNoCurrentIndex means the cursor has no usable current index; this code is a named lookup miss. The first useful observation is to enumerate table indexes, schema version, migration completion, and current-index selection. This evidence separates index schema, current-index cursor state, key construction, and duplicate data.

Reconstruct the engine state

  • Code-specific observation: enumerate table indexes, schema version, migration completion, and current-index selection.
  • 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; associate it with this result rather than with a later generic exception.
  • the current index plus every JetMakeKey segment and grbit.

The ESE objects in play

Diagnostic layerB-tree index definition, key construction, uniqueness, and current-index cursor state
Typical API surfaceJetCreateIndex, JetDeleteIndex, JetSetCurrentIndex, JetMakeKey, JetSeek, and JetSetIndexRange
Code-specific conditionthe requested index name is valid but absent from the table
First corrective directionrestore or create the documented index before relying on its ordering or uniqueness

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

  1. Freeze the failing request context and record 0xC800057C, the Jet API name, and the current instance/session ownership.
  2. Verify the code-specific precondition: enumerate table indexes, schema version, migration completion, and current-index selection.
  3. Apply the targeted fix: restore or create the documented index before relying on its ordering or uniqueness.
  4. Before retrying the operation, reconcile index definition, selected cursor index, and key or uniqueness outcome.

Do not collapse these codes together

hrIndexMustStaythe requested delete would remove an index required by the table layout, commonly the clustered index
hrKeyDuplicatean insert or update would violate a unique or primary index key
hrIndexInvalidDefthe index key definition, flags, locale, or conditional metadata is internally invalid

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.