What does HRESULT 0x80040E5F (DB_E_CANTFILTER) mean?

 
Previous Next
DB_E_MULTIPLESTORAGE DB_E_CANTORDER

DB_E_CANTFILTER

Meaning

Windows documents DB_E_CANTFILTER as “Filter cannot be opened”. In this case, the provider cannot open the requested filter view over the current source rowset.

Relevant contract

OLE DB view interfaces apply filter and sort definitions to a source rowset. Opening a filter or order depends on the view object, criteria metadata, rowset capabilities and current source state, not merely on the text of a predicate or sort key.

Investigation of this result should start with the IRowsetView-derived object, source rowset generation and filter or sort definition being opened.

Conditions that specifically lead to the result

  • Cause 1: the filter definition uses unsupported criteria or types.
  • Cause 2: the source rowset state no longer permits opening the view.
  • Cause 3: the provider cannot allocate or materialize the filter object.

Evidence to collect

When recording diagnostic data involving filter values, sort keys and row identities, use types, lengths, hashes or redacted identifiers rather than secrets or complete business data.

  • Evidence 1: filter criteria and accessor metadata.
  • Evidence 2: source rowset properties and generation.
  • Evidence 3: provider error records from the filter-open call.

Diagnostic sequence

  1. Identify the exact failing stage: the provider cannot open the requested filter view over the current source rowset.

Corrective actions

  • Action 1: reduce the filter to supported comparison operations.
  • Action 2: recreate the view against the current source rowset.
  • Action 3: apply filtering in command text only when semantics remain equivalent.

Retry and recovery

Retry rule: retry after changing the filter definition, source state or provider capability.

Practical scenario

A cached filter references a column removed from the projection; rebuilding the view against current metadata allows it to open.

Difference from nearby HRESULT values

DB_E_BADCOMPAREOP rejects a specific comparison operator, while DB_E_CANTFILTER means the filter as a whole cannot be opened.

Official Microsoft references


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