| Previous | Next |
| DB_E_BADTYPE | DB_E_DUPLICATETABLEID |
DB_E_DUPLICATECOLUMNID
Meaning
Windows documents DB_E_DUPLICATECOLUMNID as “Column ID already exists or occurred more than once in the array of columns”. Here, a column-definition operation receives a column identifier that already exists or occurs more than once in the submitted column array.
Specific conditions that produce the result
- Cause 1: the new column duplicates an existing table column.
- Cause 2: the request array repeats the same DBID.
- Cause 3: identifier normalization or case folding makes two names equivalent.
Relevant OLE DB contract
This result must be interpreted against this contract: OLE DB data-definition interfaces operate on provider-scoped table and index DBIDs; existence, identifier validity and active use are separate outcomes, and schema changes must account for open rowsets and transactions.
Start with the session performing the definition operation and the table or index identity resolved by that session when investigating this result.
Evidence to collect before changing the system
- Evidence 1: the table DBID and all submitted column DBIDs.
- Evidence 2: current column metadata.
- Evidence 3: the positions of duplicate identifiers in the request.
Corrective actions
- Action 1: deduplicate the definition array before the provider call.
- Action 2: compare identifiers using provider case rules.
- Action 3: make add-column migrations idempotent when definitions match.
Practical incident
A migration builder appends the same audit column from two feature modules; detecting duplicates before CreateTable avoids it.
Retry and recovery policy
Retry rule: retry only after removing the duplicate or selecting a unique column identifier.
Difference from related HRESULT values
DB_E_BADCOLUMNID means a column identifier is invalid, while DB_E_DUPLICATECOLUMNID means valid identifiers collide or repeat.
Official Microsoft references
Looking for a different code? Search another status or error code.
