What does HRESULT 0x80040E1E (DB_E_BADSTARTPOSITION) mean?

 
Previous Next
DB_E_UNSUPPORTEDCONVERSION DB_E_NOQUERY

DB_E_BADSTARTPOSITION

Meaning

Windows documents DB_E_BADSTARTPOSITION as “No rows were returned because the offset value moves the position before the beginning or after the end of the rowset”. Here, a row-fetch positioning request uses an offset that places the start before the beginning or after the end of 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.

Specific conditions that produce the result

  • Cause 1: a negative offset exceeds the rows before the reference bookmark.
  • Cause 2: a positive offset exceeds the remaining rows.
  • Cause 3: row-count assumptions became stale after filtering or data changes.

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 reference bookmark, signed offset and requested row count.
  • Evidence 2: current rowset size or approximate-position information.
  • Evidence 3: filter, chapter and transaction state affecting visible rows.

Corrective actions

  • Action 1: clamp user-derived offsets to valid boundaries.
  • Action 2: refresh pagination state when the rowset changes.
  • Action 3: treat an empty valid range separately from an invalid starting position.

Retry and recovery policy

Retry rule: retry after recalculating the start position from the current rowset.

Practical incident

A pager keeps a page index after a filter reduces the result set and requests a start beyond the new end; resetting pagination avoids it.

Difference from related HRESULT values

DB_E_BADRATIO rejects an invalid fractional position, while DB_E_BADSTARTPOSITION rejects a concrete offset outside the rowset.

Official Microsoft references


Looking for a different code? Search another status or error code.