| Previous | Next |
| QPARSE_E_EXPECTING_REGEX_PROPERTY | QPARSE_E_NO_SUCH_PROPERTY |
QPARSE_E_INVALID_LITERAL
A present literal is invalid
QPARSE_E_INVALID_LITERAL is HRESULT 0x8004166E. Windows documents it as “Invalid literal.”
Legacy API stage
This result belongs to legacy Windows query parsing and is returned while converting query text into the typed value required by a property and operator. The exact condition is: the numeric/date/currency/GUID form, quoting, locale, suffix or type pairing is invalid.
Why it appears
Developer evidence
- Associate raw literal with the exact UTC timestamp and correlation identifier.
- Compare failing and known-good values for property DBTYPE under the same provider or handler version.
- Record the source and normalization path of operator, not only its display form.
- Record unconsumed suffix before releasing the relevant objects.
- Associate final parser input bytes with the exact UTC timestamp and correlation identifier.
Disciplined troubleshooting
- Capture raw literal and property DBTYPE at the call boundary that returns this result.
- Confirm the operation reached converting query text into the typed value required by a property and operator with the intended operator.
- capture exact bytes, property DBTYPE, operator, locale and first unconsumed character.
Retry conditions
Parse application values before serialization and emit invariant typed syntax. Retrying identical parser bytes cannot succeed; regenerate the specific token or schema pairing that failed.
Misleading assumptions
Related query outcomes
EXPECTING_* values mean a required token class is absent; this value rejects a present literal.
Developer and administrator guidance
Concrete troubleshooting case
A date is serialized in a locale-specific order. Invariant typed serialization fixes the comparison.
Official Microsoft references
Looking for a different code? Search another status or error code.