What does HRESULT 0x00040EC2 (DB_S_TYPEINFOOVERRIDDEN) mean?

 
Previous Next
DB_S_COLUMNTYPEMISMATCH DB_S_BOOKMARKSKIPPED

DB_S_TYPEINFOOVERRIDDEN

OLE DB caller metadata overrode parameter type information

DB_S_TYPEINFOOVERRIDDEN is HRESULT 265922 (0x00040EC2) from Microsoft OLE DB. The documented description is “Parameter type information was overridden by caller.” The high-order severity bit is clear, so this is a success result, but it carries more information than plain S_OK.

The command accepted caller-supplied parameter type information and used it instead of the provider’s inferred or original metadata.

Where the result is encountered

  • This result can appear in ICommandWithParameters parameter setup; record the producing interface and method.
  • This result can appear in stored procedure calls; record the producing interface and method.
  • It can appear in providers that allow consumers to specify DBPARAMBINDINFO; record the producing interface and method.

State to verify

The central question is whether the override matches the server parameter contract and does not cause truncation, coercion, or plan changes the caller did not intend.

Evidence to preserve

  • Preserve parameter ordinal and name.
  • Preserve original and overridden DBTYPE.
  • Preserve size, precision, scale, and flags.
  • Preserve binding structure.
  • Preserve server-side parameter metadata and execution result.

Correct handling, retry, and recovery

Treat the override as part of the command contract. Validate it against the data source and remove unnecessary overrides that mask metadata drift.

Diagnostic sequence

  • Capture the raw HRESULT 0x00040EC2 immediately after the returning method and record whether the caller used SUCCEEDED, FAILED, equality testing, or exception translation.
  • Verify the method-specific state: the override matches the server parameter contract and does not cause truncation, coercion, or plan changes the caller did not intend.

Practical validation scenario

A provider infers a string parameter while the procedure expects a fixed binary token. The consumer supplies binary metadata, records the warning, and verifies exact bytes reach the procedure.

Difference from nearby HRESULT values

DB_S_COLUMNTYPEMISMATCH concerns column copying; it concerns parameter metadata chosen before execution.

Developer and administrator guidance

References


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