| Previous | Next |
| DB_E_SCHEMAVIOLATION | DB_E_OBJECTOPEN |
DB_E_BADROWHANDLE
Meaning
Windows documents DB_E_BADROWHANDLE as “Row handle is invalid”. Here, an OLE DB rowset method receives an HROW that is not valid for that rowset.
Evidence to collect before changing the system
When it involves row values, bookmarks, keys and query parameters, record types, lengths, hashes or redacted identifiers instead of secrets or full business data.
- Evidence 1: the rowset identity, HROW value and method that rejected it.
- Evidence 2: the GetNextRows or InsertRow call that produced the handle.
- Evidence 3: ReleaseRows, deletion and rowset-lifetime events preceding the failure.
Relevant OLE DB contract
This result must be interpreted against this contract: OLE DB rowsets own HROW values, fetch position, granted properties and visibility rules; row handles, bookmarks, update state and navigation capabilities remain valid only under the lifetime and generation that produced them.
Specific conditions that produce it
- Cause 1: the row handle was already released.
- Cause 2: the handle belongs to another rowset instance.
- Cause 3: the row was invalidated by deletion, restart, resynchronization or rowset replacement.
Corrective actions
- Action 1: keep HROW values scoped to the rowset that created them.
- Action 2: remove handles from caches immediately after ReleaseRows.
- Action 3: reacquire the row after topology, transaction or rowset state changes.
Practical incident
A cache preserves HROW values across a query re-execution and later calls GetData on the new rowset; refetching the rows prevents it.
Retry and recovery policy
Retry rule: retry only after fetching or inserting a fresh row handle from the current rowset.
Difference from related HRESULT values
DB_E_DELETEDROW means the handle identifies a deleted row, whereas it means the handle is not valid for the receiving rowset at all.
Official Microsoft references
Looking for a different code? Search another status or error code.