What does HRESULT 0x80040E3A (DB_E_BADPRECISION) mean?

 
Previous Next
DB_E_BADCOPY DB_E_BADSCALE

DB_E_BADPRECISION

Meaning

Windows documents DB_E_BADPRECISION as “Precision is invalid”. Here, a column, parameter or binding specifies a precision value outside the range accepted for its type.

Relevant OLE DB contract

This result must be interpreted against this contract: OLE DB schema contracts combine DBIDs, provider type metadata, column attributes, constraints and locale rules; current provider metadata is authoritative; cached ordinals or type assumptions can become invalid after a schema or command change.

Diagnostic sequence

  1. Capture this result immediately at the native OLE DB return and obtain the current OLE DB error object before another COM call replaces thread error information.
  2. Identify the exact stage: a column, parameter or binding specifies a precision value outside the range accepted for its type.

Specific conditions that produce it

  • Cause 1: precision is zero where the type requires a positive value.
  • Cause 2: precision exceeds provider or native-type limits.
  • Cause 3: precision is supplied for a type where that field is not meaningful.

Evidence to collect before changing the system

  • Evidence 1: the DBTYPE, precision and scale values.
  • Evidence 2: provider type metadata and native type name.
  • Evidence 3: the structure and ordinal carrying the invalid precision.

Corrective actions

  • Action 1: derive precision from provider metadata.
  • Action 2: validate type-specific limits before creating bindings or schema objects.
  • Action 3: keep precision and buffer length calculations separate.

Retry and recovery policy

Retry rule: retry after correcting the precision for the selected type.

Difference from related HRESULT values

DB_E_BADSCALE rejects the fractional scale, while DB_E_BADPRECISION rejects the total number of significant digits.

Practical incident

A schema generator copies a 38-digit precision to a provider whose numeric type supports only 28 digits; mapping to the provider limit resolves it.

Official Microsoft references


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