| Previous | Next |
| DB_E_OBJECTOPEN | DB_E_CANTCONVERTVALUE |
DB_E_BADCHAPTER
Meaning
Windows documents DB_E_BADCHAPTER as “Chapter is invalid”. Here, a chapter-aware OLE DB method receives an HCHAPTER that is invalid for the target rowset.
Relevant OLE DB contract
This result must be interpreted against this contract: chaptered rowsets expose hierarchical results through chapter columns and HCHAPTER values; a flat rowset, an invalid chapter handle and a valid chapter with no matching row are different contracts and must be diagnosed separately.
Start with the chaptered rowset, parent row and HCHAPTER lifetime associated with the operation when investigating this result.
Evidence to collect before changing the system
When it involves parent keys, chapter identifiers, row contents and hierarchical paths, record types, lengths, hashes or redacted identifiers instead of secrets or full business data.
- Evidence 1: the parent rowset and chapter handle identities.
- Evidence 2: the call that created or returned the HCHAPTER.
- Evidence 3: chapter release events and the parent row lifetime.
Specific conditions that produce it
- Cause 1: the chapter handle was released.
- Cause 2: the handle came from another chaptered rowset.
- Cause 3: the parent row or rowset generation ended before the chapter operation.
Retry and recovery policy
Retry rule: retry only with a chapter obtained from the current chaptered rowset.
Corrective actions
- Action 1: scope each chapter handle to its source rowset and parent context.
- Action 2: release chapters exactly once and clear cached handles.
- Action 3: reacquire the chapter after parent-row or rowset changes.
Practical incident
A hierarchical consumer stores a child chapter after releasing the parent rowset, then uses it in a new rowset; obtaining a new HCHAPTER prevents it.
Difference from related HRESULT values
DB_E_INVALID states that a rowset is not chaptered, while DB_E_BADCHAPTER states that a supplied chapter handle is invalid.
Official Microsoft references
Looking for a different code? Search another status or error code.