What does HRESULT 0x80040E13 (DB_E_BADVALUES) mean?

 
Previous Next
DB_E_BADRATIO DB_E_ERRORSINCOMMAND

DB_E_BADVALUES

Meaning

Windows documents DB_E_BADVALUES as “Value is invalid”. Here, an OLE DB operation receives one or more values that are invalid for its contract but are not classified by a narrower result.

Evidence to collect before changing the system

When it involves command text, parameter values, object names and query-plan details, record types, lengths, hashes or redacted identifiers instead of secrets or full business data.

  • Evidence 1: the method, structure type and exact field names rejected.
  • Evidence 2: per-element status arrays and OLE DB error records.
  • Evidence 3: the provider version and capability set used to validate the values.

Relevant OLE DB contract

This result must be interpreted against this contract: an OLE DB command moves through explicit states: command definition, properties and parameters are established before optional preparation and execution; dialect, query-tree and optimizer contracts are provider-specific and should be inferred only from reported capabilities.

Specific conditions that produce it

  • Cause 1: an enumeration or numeric field is outside its allowed domain.
  • Cause 2: a required structure member is inconsistent with related members.
  • Cause 3: a provider-specific property or command-tree value violates documented constraints.

Corrective actions

  • Action 1: validate every value against the specific method contract.
  • Action 2: prefer typed enumerations and checked structure builders over raw integers.
  • Action 3: use provider diagnostics to identify the rejected element before changing data broadly.

Practical incident

A command-tree builder leaves a node field initialized to an unsupported sentinel and the provider returns it; constructing the node through a validated helper fixes the call.

Retry and recovery policy

Retry rule: retry only after replacing the invalid value set with one that meets the method contract.

Difference from related HRESULT values

DB_E_BADPROPERTYVALUE specifically rejects a property value, while DB_E_BADVALUES is the broader invalid-value result for the operation.

Official Microsoft references


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