| Previous | Next |
| DB_S_ERRORSRETURNED | DB_S_DELETEDROW |
DB_S_BADROWHANDLE
OLE DB encountered an invalid HROW while processing other work
DB_S_BADROWHANDLE is HRESULT 265939 (0x00040ED3) from Microsoft OLE DB. The documented description is “Row handle is invalid.” The high-order severity bit is clear, so this is a success result, but it carries more information than plain S_OK.
The operation reports that a row handle is invalid, typically as a per-row or mixed-status condition rather than a total provider failure.
State to verify
The central question is whether the invalid handle is identified and no valid row handle is discarded or reused incorrectly.
Where the result is encountered
- This result can appear in ReleaseRows or row update batches; record the producing interface and method.
- It can appear in consumers retaining HROW values too long; record the producing interface and method.
- It can appear in dynamic rowsets where handles become invalid; record the producing interface and method.
Evidence to preserve
- Preserve HROW values and owning rowset.
- Preserve acquisition and release sequence.
- Preserve rowset generation.
- Preserve per-row status array.
- Preserve concurrent delete or restart activity.
Diagnostic sequence
- Capture the raw HRESULT
0x00040ED3immediately after the returning method and record whether the caller usedSUCCEEDED,FAILED, equality testing, or exception translation. - Verify the method-specific state: the invalid handle is identified and no valid row handle is discarded or reused incorrectly.
Correct handling, retry, and recovery
Remove the invalid handle from consumer state, reacquire the row if needed, and audit handle ownership. Do not retry the same stale HROW against a new rowset.
Practical validation scenario
A cache mixes handles from two rowset generations. The provider flags one as bad; the client clears generation-mismatched handles and refetches by key.
Difference from nearby HRESULT values
DB_S_DELETEDROW means the handle identifies a row that was deleted; it means the handle itself is not valid for the operation.
References
Looking for a different code? Search another status or error code.