| Previous | Next |
| DB_E_DELETEDROW | DB_E_ROWSNOTRELEASED |
DB_E_CANTFETCHBACKWARDS
Meaning
Windows documents DB_E_CANTFETCHBACKWARDS as “Rowset does not support fetching backward”. Here, IRowset::GetNextRows is asked to fetch rows in the backward direction but the rowset does not support backward fetching.
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.
Start with the current rowset instance, its granted properties and the exact row or position token used by the consumer when investigating this result.
Evidence to collect before changing the system
- Evidence 1: the signed cRows value and fetch offset.
- Evidence 2: rowset properties for backward fetch support.
- Evidence 3: the rowset creation properties actually granted by the provider.
Specific conditions that produce it
- Cause 1: a negative row count is used on a forward-only rowset.
- Cause 2: the requested DBPROP_CANFETCHBACKWARDS capability was not obtained.
- Cause 3: a cursor service or provider configuration changed the rowset to sequential mode.
Retry and recovery policy
Retry rule: retry only with a rowset that supports backward fetch or with a forward request.
Corrective actions
- Action 1: request backward-fetch capability before rowset creation.
- Action 2: use bookmarks, scrolling interfaces or a client cache when supported.
- Action 3: fall back to forward-only navigation without issuing negative fetch counts.
Practical incident
A data grid sends cRows=-50 for Page Up against a streaming rowset; using a client-side page cache prevents it.
Difference from related HRESULT values
DB_E_CANTSCROLLBACKWARDS concerns moving the fetch position backward by offset, while DB_E_CANTFETCHBACKWARDS concerns returning rows in reverse direction.
Official Microsoft references
Looking for a different code? Search another status or error code.