| Previous | Next |
| DB_E_RESOURCELOCKED | DB_E_READONLY |
DB_E_NOTCOLLECTION
Meaning
Windows documents DB_E_NOTCOLLECTION as “Client requested an object type that is valid only for a collection”. In this case, the requested operation or object type is valid only for a collection, but the URL resolves to a noncollection resource.
Relevant contract
Investigation of this result should start with the binder or session, normalized URL, requested GUID/object type and DBBINDURLSTATUS result.
Conditions that specifically lead to the result
- Cause 1: a create-child operation targets a leaf row.
- Cause 2: the requested GUID describes a rowset or collection interface.
- Cause 3: the URL was expected to end at a folder but resolves to a stream.
Evidence to collect
A useful diagnostic event records provider CLSID and version, process architecture, interface IID and method, object correlation ID, transaction state and the immediately preceding HRESULT. 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: resolved object type for the URL.
- Evidence 2: requested resource GUID and bind flags.
- Evidence 3: parent-child relationship expected by the caller.
Diagnostic sequence
- Identify the exact failing stage: the requested operation or object type is valid only for a collection, but the URL resolves to a noncollection resource.
Corrective actions
- Action 1: bind to the parent collection before child operations.
- Action 2: inspect object type rather than infer it from URL syntax.
- Action 3: use row or stream operations for leaf resources.
Retry and recovery
Retry rule: retry after selecting a URL that resolves to a collection.
Practical scenario
A namespace browser tries to enumerate children of a document row; checking its resource type prevents it.
Difference from nearby HRESULT values
DB_E_RESOURCENOTSUPPORTED means the provider lacks the requested type, while DB_E_NOTCOLLECTION means this particular resource is not a collection.
Official Microsoft references
Looking for a different code? Search another status or error code.