What does HRESULT 0x00040941 (IDS_MON_MATCH_STRING) mean?

 
Previous Next
IDS_MON_WEIGHT_OUT_OF_RANGE IDS_MON_PROPERTY_NAME_IN_VIEW

IDS_MON_MATCH_STRING

IDS_MON_MATCH_STRING points to the contents of a match pattern rather than the surrounding SQL clause. Windows Search has different pattern languages for LIKE and full-text CONTAINS: their wildcards, quoting, and Boolean syntax are not interchangeable.

Identify which predicate owns the match string

  • For LIKE, validate percent, underscore, and bracket pattern syntax inside a string literal.
  • For CONTAINS, validate nested quotes, phrases, wildcard placement, and the AND/OR/NOT restrictions of the content-search condition.
  • Log the pattern after escaping; application UI text is not enough to reproduce a quoting error introduced by the SQL builder.

A common mistake is to reuse a filesystem glob or SQL LIKE pattern inside CONTAINS. Windows Search documents an asterisk suffix for full-text wildcard terms, while LIKE uses percent and underscore patterns. Fix the predicate-specific pattern generator instead of stripping punctuation until the query happens to parse.

LIKE predicate · CONTAINS predicate · Parser messages


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