| Previous | Next |
| DB_E_BADSTORAGEFLAGS | DB_E_NULLACCESSORNOTSUPPORTED |
DB_E_BYREFACCESSORNOTSUPPORTED
Meaning
Windows documents DB_E_BYREFACCESSORNOTSUPPORTED as “Reference accessors are not supported by this provider”. Here, the consumer requests a reference accessor but the provider does not support by-reference accessors.
Specific conditions that produce the result
- Cause 1: DBTYPE_BYREF is used in one or more bindings.
- Cause 2: the consumer assumes provider-owned pointers are available for long data.
- Cause 3: a reusable binding map was built for a different provider capability.
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.
Evidence to collect before changing the system
- Evidence 1: the bindings containing DBTYPE_BYREF.
- Evidence 2: the object's IConvertType and accessor capabilities.
- Evidence 3: buffer ownership and lifetime expectations.
Corrective actions
- Action 1: use consumer-owned buffers with ordinary value bindings.
- Action 2: stream long data through a supported storage interface.
- Action 3: capability-gate optimized by-reference paths.
Practical incident
A high-performance path requests provider-owned string pointers from a provider that only copies values; ordinary buffers avoid it.
Retry and recovery policy
Retry rule: retry after rebuilding the accessor without by-reference bindings.
Difference from related HRESULT values
DB_E_BADTYPE rejects an invalid type indicator, while DB_E_BYREFACCESSORNOTSUPPORTED rejects a valid by-reference form the provider does not implement.
Official Microsoft references
Looking for a different code? Search another status or error code.