What does HRESULT 0xC8000425 (hrInvalidCountry) mean?

 
Previous Next
hrTooManyActiveUsers hrInvalidLanguageId

hrInvalidCountry

Why this is more specific than the message text

hrInvalidCountry means a legacy locale/country value is not recognized for collation or index creation.

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

The key comparison is: hrInvalidLanguageId and hrInvalidCodePage diagnose adjacent but distinct locale fields. The first useful observation is to capture the numeric country value, locale source, OS version, and index definition using it. This evidence separates character encoding from language and collation metadata.

Related ESE conditions

hrInvalidCodePagethe column or index requests an unsupported or invalid text code page
hrInvalidLanguageIdthe requested language identifier cannot define the intended collation behavior

The ESE objects in play

Diagnostic layertext encoding, locale, and index collation metadata
Typical API surfacecolumn and index creation structures, JET_COLUMNDEF, JET_CP, and locale-aware index definitions
Code-specific conditiona legacy locale/country value is not recognized for collation or index creation
First corrective directionreplace legacy locale identifiers with supported settings and rebuild affected indexes deliberately

Changing locale metadata can change index ordering and normally requires a controlled rebuild. Lossy conversion before the API can hide the original invalid value.

Data for a reproducible case

  • Code-specific observation: capture the numeric country value, locale source, OS version, and index definition using it.
  • the original LANGID, LCID, country value, JET_CP, and column type; associate it with this result rather than with a later generic exception.
  • the operating-system locale and sort-version data.
  • the index definition and encoded sample that exposed the mismatch.

Corrective workflow

  1. Freeze the failing request context and record 0xC8000425, the Jet API name, and the current instance/session ownership.
  2. Verify the code-specific precondition: capture the numeric country value, locale source, OS version, and index definition using it.
  3. Apply the targeted fix: replace legacy locale identifiers with supported settings and rebuild affected indexes deliberately.
  4. Before retrying the operation, reconcile encoded values, collation behavior, and rebuilt index ordering.

Actions that can hide or worsen the problem

  • Do not use lossy text conversion to make an unsupported value appear valid.
  • Do not change locale or code-page metadata without planning the required index rebuild.

Technical references


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