| Previous | Next |
| DB_E_DUPLICATEDATASOURCE | DB_E_NOTFOUND |
DB_E_CANNOTRESTART
Meaning
Windows documents DB_E_CANNOTRESTART as “Rowset position cannot be restarted”. Here, a consumer asks a rowset to restart its sequential fetch position but the provider cannot do so.
Evidence to collect before changing the system
- Evidence 1: rowset properties for scrolling and restart behavior.
- Evidence 2: the current fetch position and rows already consumed.
- Evidence 3: the command, transaction isolation and source type that produced the rowset.
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.
Specific conditions that produce it
- Cause 1: the rowset is forward-only and does not support restart.
- Cause 2: the underlying command is nonrepeatable or has side effects.
- Cause 3: the transaction or live data source cannot recreate the original sequence consistently.
Corrective actions
- Action 1: request a scrollable or restartable rowset when restart is required.
- Action 2: reexecute a safe read-only command and replace the rowset when permitted.
- Action 3: design streaming consumers to process data in one pass.
Practical incident
A CSV-backed provider exposes a forward-only stream and a report engine tries to rewind it for a second pass; materializing the rows or reopening the source avoids it.
Retry and recovery policy
Retry rule: retry only by creating a new suitable rowset or reexecuting a repeatable command; calling restart again on the same unsupported rowset is pointless.
Difference from related HRESULT values
DB_E_CANTSCROLLBACKWARDS concerns backward offset movement, while DB_E_CANNOTRESTART specifically reports inability to return the rowset position to its start.
Official Microsoft references
Looking for a different code? Search another status or error code.