| Previous | Next |
| MD_E_INVALIDCELLRANGE | DB_E_COMMANDNOTPERSISTED |
DB_E_NOCOLUMN
Meaning
Windows documents DB_E_NOCOLUMN as “Column ID is invalid”. In this case, a method receives a DBID that does not identify a column in the current row, rowset or schema scope.
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.
Evidence to collect
When recording diagnostic data involving column names, row values and query projections, use types, lengths, hashes or redacted identifiers rather than secrets or complete business data.
- Evidence 1: the complete DBID kind and components.
- Evidence 2: current column metadata for the object.
- Evidence 3: schema version and object identity used to construct the DBID.
Conditions that specifically lead to it
- Cause 1: the DBID name or GUID is wrong.
- Cause 2: a row-object column ID is reused as a base-table column ID.
- Cause 3: the column was removed or renamed after metadata was cached.
Diagnostic sequence
- Identify the exact failing stage: a method receives a DBID that does not identify a column in the current row, rowset or schema scope.
Retry and recovery
Retry rule: retry after supplying a DBID that current metadata identifies as a column.
Corrective actions
- Action 1: use DBIDs returned for the exact target interface.
- Action 2: rebuild IDs after schema changes.
- Action 3: avoid translating column names without provider identifier rules.
Practical scenario
A schema editor uses a result-set column DBID in IAlterTable; resolving the base column ID prevents it.
Difference from nearby HRESULT values
DB_E_BADORDINAL rejects a numeric column position, while DB_E_NOCOLUMN rejects a DBID.
Official Microsoft references
Looking for a different code? Search another status or error code.