| Previous | Next |
| hrInvalidLanguageId | hrVersionStoreOutOfMemory |
hrInvalidCodePage
The object and state that matter
hrInvalidCodePage means the column or index requests an unsupported or invalid text code page.
This is the legacy Directory Service backup/restore HRESULT form of JET_errInvalidCodePage (0xC8000427).
The key comparison is: hrInvalidLanguageId changes collation selection; this result changes character encoding interpretation. The first useful observation is to capture JET_CP, column type, input encoding, locale, and whether Unicode data was narrowed. This evidence separates character encoding from language and collation metadata.
Minimum useful trace
- Code-specific observation: capture JET_CP, column type, input encoding, locale, and whether Unicode data was narrowed.
- 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; associate it with this result rather than with a later generic exception.
- the index definition and encoded sample that exposed the mismatch.
How to avoid a false diagnosis
hrInvalidLanguageId | the requested language identifier cannot define the intended collation behavior |
|---|---|
hrInvalidCountry | a legacy locale/country value is not recognized for collation or index creation |
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 | the column or index requests an unsupported or invalid text code page |
| First corrective direction | keep Unicode data Unicode or select a documented ESE code page consistently across schema and input |
Encoding and collation are different schema decisions. Changing locale metadata can change index ordering and normally requires a controlled rebuild.
Safe recovery sequence
- Freeze the failing request context and record
0xC8000427, the Jet API name, and the current instance/session ownership. - Verify the code-specific precondition: capture JET_CP, column type, input encoding, locale, and whether Unicode data was narrowed.
- Apply the targeted fix: keep Unicode data Unicode or select a documented ESE code page consistently across schema and input.
- 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.
