| Previous | Next |
| DB_E_BADCONSTRAINTFORM | DB_E_BADMATCHTYPE |
DB_E_BADDEFERRABILITY
Meaning
Windows documents DB_E_BADDEFERRABILITY as “Specified deferrability flag is invalid or not supported by the provider”. In this case, a constraint descriptor requests an invalid or unsupported deferrability mode.
Relevant contract
OLE DB DDL interfaces identify indexes, commands and constraints with provider-scoped DBIDs. Constraint descriptors also carry type, column arrays, match behavior, deferrability and update/delete rules that must agree as one structure.
Investigation of this result should start with the session performing DDL, target table metadata and the exact DBID or DBCONSTRAINTDESC supplied.
Conditions that specifically lead to the result
- Cause 1: unknown deferrability bits are set.
- Cause 2: the provider does not support deferred constraints.
- Cause 3: the selected constraint type cannot use the requested mode.
Evidence to collect
When recording diagnostic data involving catalog names, schema names, object identifiers and deployment definitions, use types, lengths, hashes or redacted identifiers rather than secrets or complete business data.
- Evidence 1: deferrability value and constraint type.
- Evidence 2: provider DDL capability metadata.
- Evidence 3: transaction semantics expected by the application.
Diagnostic sequence
- Identify the exact failing stage: a constraint descriptor requests an invalid or unsupported deferrability mode.
Corrective actions
- Action 1: use a documented deferrability value.
- Action 2: omit deferred behavior when the provider cannot guarantee it.
- Action 3: redesign transaction ordering rather than silently weakening integrity.
Retry and recovery
Retry rule: retry after selecting a provider-supported deferrability contract.
Practical scenario
A migration marks every constraint initially deferred on a provider with immediate-only validation; capability-aware DDL avoids the result.
Difference from nearby HRESULT values
DB_E_BADMATCHTYPE concerns foreign-key matching semantics, while DB_E_BADDEFERRABILITY concerns when constraint checking occurs.
Official Microsoft references
Looking for a different code? Search another status or error code.
