| Previous | Next |
| DB_E_NOTCOLLECTION | DB_E_ASYNCNOTSUPPORTED |
DB_E_READONLY
Meaning
Windows documents DB_E_READONLY as “Caller requested write access to a read-only object”. In this case, the caller requests write access to an object whose provider contract or current representation is read-only.
Relevant contract
The OLE DB binder model maps URLs to row, rowset, stream or collection objects. URL scope, requested object type, bind flags, asynchronous capability, locks and server reachability are independent parts of the binding contract.
Investigation of this result should start with the binder or session, normalized URL, requested GUID/object type and DBBINDURLSTATUS result.
Evidence to collect
When recording diagnostic data involving URLs containing credentials, tenant paths and remote object names, use types, lengths, hashes or redacted identifiers rather than secrets or complete business data.
- Evidence 1: requested access flags.
- Evidence 2: resource and provider capabilities.
- Evidence 3: whether a writable parent or alternate endpoint exists.
Conditions that specifically lead to it
- Cause 1: the resource is inherently read-only.
- Cause 2: the bind flags request write access through a read-only view.
- Cause 3: provider or server policy mounted the namespace without mutation support.
Diagnostic sequence
- Identify the exact failing stage: the caller requests write access to an object whose provider contract or current representation is read-only.
Retry and recovery
Retry rule: retry only after access mode or object mutability has changed.
Corrective actions
- Action 1: open the object for read access.
- Action 2: route writes through a supported mutable object.
- Action 3: do not disguise a read-only contract as a transient lock.
Practical scenario
A report archive exposes row objects for reading only; opening them without write flags avoids it.
Difference from nearby HRESULT values
DB_E_RESOURCELOCKED is temporary ownership conflict, while DB_E_READONLY is a capability or policy property of the object.
Official Microsoft references
Looking for a different code? Search another status or error code.
