| Previous | Next |
| DB_E_PENDINGCHANGES | DB_E_BADHRESULT |
DB_E_DATAOVERFLOW
Meaning
Windows documents DB_E_DATAOVERFLOW as “Literal value in the command exceeded the range of the type of the associated column”. In this case, command processing finds that a literal value exceeds the range of the associated column type.
Conditions that specifically lead to the result
- Cause 1: a numeric literal is outside the provider type range.
- Cause 2: a date or time literal cannot be represented by the target type.
- Cause 3: schema metadata changed while generated command text retained an older range assumption.
Relevant contract
OLE DB distinguishes numeric ordinals, DBID-based column identifiers and per-column status. Metadata from IColumnsInfo or a row object is authoritative for the current result shape; cached identifiers can become invalid after command, schema or projection changes.
Investigation of this result should start with the current command result, rowset or row object and the metadata generation from which the column reference came.
Diagnostic sequence
- Identify the exact failing stage: command processing finds that a literal value exceeds the range of the associated column type.
Evidence to collect
- Evidence 1: the literal token in redacted form.
- Evidence 2: the target column provider type, precision and scale.
- Evidence 3: provider-native diagnostic records identifying the conversion boundary.
Corrective actions
- Action 1: parameterize values with explicit type metadata.
- Action 2: validate ranges using current provider schema information.
- Action 3: choose a wider target type only when the data model permits it.
Practical scenario
Generated SQL embeds an integer larger than a small target column; a typed parameter catches the range mismatch before execution.
Retry and recovery
Retry rule: retry after changing the literal or target schema so the value is representable.
Difference from nearby HRESULT values
DB_E_CANTCONVERTVALUE can reject a particular conversion, while DB_E_DATAOVERFLOW specifically identifies a value outside the target range.
Official Microsoft references
Looking for a different code? Search another status or error code.
