| Previous | Next |
| DB_E_CANTFETCHBACKWARDS | DB_E_BADSTORAGEFLAG |
DB_E_ROWSNOTRELEASED
Meaning
Windows documents DB_E_ROWSNOTRELEASED as “Row handles must all be released before new ones can be obtained”. Here, a fetch operation cannot obtain more rows until previously returned row handles are released.
Specific conditions that produce the result
- Cause 1: the provider reports DBPROP_CANHOLDROWS as false.
- Cause 2: the consumer retained HROW values after copying their data.
- Cause 3: an exception or cancellation path skipped ReleaseRows.
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 outstanding HROW count and reference counts.
- Evidence 2: the rowset's can-hold-rows property.
- Evidence 3: fetch and ReleaseRows correlation IDs.
Corrective actions
- Action 1: release each fetched batch before requesting the next one.
- Action 2: copy required data out of provider buffers before releasing rows.
- Action 3: use deterministic cleanup for partial fetch and error paths.
Practical incident
A scanner reads data into application objects but keeps every HROW in a vector; releasing each batch lets GetNextRows continue without it.
Retry and recovery policy
Retry rule: retry after releasing all rows required by the provider.
Difference from related HRESULT values
DB_E_ROWLIMITEXCEEDED is a provider active-row ceiling reached by insertion, while DB_E_ROWSNOTRELEASED explicitly requires existing handles to be released before another fetch.
Official Microsoft references
Looking for a different code? Search another status or error code.