| 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
hrInvalidCodePage | the column or index requests an unsupported or invalid text code page |
|---|---|
hrInvalidLanguageId | the requested language identifier cannot define the intended collation behavior |
The ESE objects in play
| Diagnostic layer | text encoding, locale, and index collation metadata |
|---|---|
| Typical API surface | column and index creation structures, JET_COLUMNDEF, JET_CP, and locale-aware index definitions |
| Code-specific condition | a legacy locale/country value is not recognized for collation or index creation |
| First corrective direction | replace 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
- Freeze the failing request context and record
0xC8000425, the Jet API name, and the current instance/session ownership. - Verify the code-specific precondition: capture the numeric country value, locale source, OS version, and index definition using it.
- Apply the targeted fix: replace legacy locale identifiers with supported settings and rebuild affected indexes deliberately.
- 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
- JET_coltyp enumeration.
- JET_CP enumeration
- JetCreateIndex
- JET error codes
- Microsoft: JET_ERR enumeration
Looking for a different code? Search another status or error code.