What does HRESULT 0xC8000413 (hrContainerNotEmpty) mean?

 
Previous Next
hrTooManyColumns hrInvalidFilename

hrContainerNotEmpty

Why this is more specific than the message text

hrContainerNotEmpty means a container-level delete or structural change was requested while dependent objects remain.

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

The key comparison is: hrTableNotEmpty has a clustered-index/schema meaning; this result concerns a containing object with children. The first useful observation is to list child tables, indexes, columns, or records relevant to the exact API before altering anything. This evidence distinguishes name collisions, stale table handles, active users, locks, and structural dependencies.

Related ESE conditions

hrTableNotEmptya clustered-index definition or structural operation requires an empty table but rows already exist
hrDensityInvalida table or index density setting falls outside the engine-supported range
hrTableLockedthe target table is under a lock incompatible with the requested operation

The ESE objects in play

Diagnostic layertable and schema-object ownership, locks, and structural dependencies
Typical API surfaceJetOpenTable, JetCreateTableColumnIndex, JetDeleteTable, and schema enumeration APIs
Code-specific conditiona container-level delete or structural change was requested while dependent objects remain
First corrective directionremove dependents in a deliberate order or use a supported recursive/application-owned cleanup path

Schema changes commonly require exclusive access and a specific transaction state. Object existence should be compared with the full expected definition before a migration is skipped.

Data for a reproducible case

  • Code-specific observation: list child tables, indexes, columns, or records relevant to the exact API before altering anything.
  • the exact schema migration step and whether a previous attempt committed.
  • the table/object metadata and normalized name.
  • all JET_TABLEID owners, open modes, transactions, and current indexes.

Corrective workflow

  1. Freeze the failing request context and record 0xC8000413, the Jet API name, and the current instance/session ownership.
  2. Verify the code-specific precondition: list child tables, indexes, columns, or records relevant to the exact API before altering anything.
  3. Apply the targeted fix: remove dependents in a deliberate order or use a supported recursive/application-owned cleanup path.
  4. 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


Looking for a different code? Search another status or error code.