| Previous | Next |
| DB_E_INVALID | DB_E_BADSTORAGEFLAGS |
DB_E_BADACCESSORFLAGS
Meaning
Windows documents DB_E_BADACCESSORFLAGS as “One or more accessor flags were invalid”. Here, IAccessor::CreateAccessor receives an invalid combination of DBACCESSORFLAGS.
Relevant OLE DB contract
This result must be interpreted against this contract: OLE DB accessors describe how columns or parameters map to a consumer buffer; an HACCESSOR is object-scoped, reference-counted and inseparable from its DBBINDING layout, bound parts, data types, offsets and ownership rules.
Start with the command or rowset that created the accessor and the consumer buffer passed to the failing method when investigating this result.
Specific conditions that produce the result
- Cause 1: unknown flag bits are set.
- Cause 2: row-data and parameter-data flags are combined where the object does not permit them.
- Cause 3: a provider-specific unsupported flag is treated as universally available.
Evidence to collect before changing the system
- Evidence 1: the exact DBACCESSORFLAGS bitmask.
- Evidence 2: whether the accessor is created on a command or rowset.
- Evidence 3: provider capability and per-binding status.
Corrective actions
- Action 1: mask out unknown bits.
- Action 2: create separate row and parameter accessors when required.
- Action 3: derive flags from the operation rather than copying them from another object.
Retry and recovery policy
Retry rule: retry after creating an accessor with a valid flag combination.
Practical incident
A wrapper copies parameter-accessor flags onto a rowset-only accessor; selecting DBACCESSOR_ROWDATA for that object removes it.
Difference from related HRESULT values
DB_E_BADBINDINFO concerns individual DBBINDING entries, while DB_E_BADACCESSORFLAGS concerns the accessor-level flag mask.
Official Microsoft references
Looking for a different code? Search another status or error code.