Site icon EfmSoft

What does HRESULT 0x80040E0E (DB_E_BADBOOKMARK) mean?

 
Previous Next
DB_E_COSTLIMIT DB_E_BADLOCKMODE

DB_E_BADBOOKMARK

Meaning

Windows documents DB_E_BADBOOKMARK as “Bookmark is invalid”. Here, a bookmark-based rowset method receives bookmark bytes that are invalid for the current rowset.

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 bookmark byte length and a safe hash of its contents.
  • Evidence 2: the rowset identity and generation that produced it.
  • Evidence 3: bookmark persistence properties and the operation that invalidated 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 it

  • Cause 1: the bookmark came from another rowset instance.
  • Cause 2: the bookmark buffer length is wrong or its bytes were truncated.
  • Cause 3: the provider invalidated bookmarks after reexecution, transaction change or row deletion.

Corrective actions

  • Action 1: keep bookmarks scoped to the rowset generation that created them.
  • Action 2: store the exact bookmark length with the bytes.
  • Action 3: refetch a bookmark after rowset reexecution or documented invalidation.

Practical incident

A UI serializes only part of a variable-length bookmark and later calls GetRowsAt; storing the full length and bytes prevents it.

Retry and recovery policy

Retry rule: retry only with a bookmark obtained from the current rowset under its supported persistence rules.

Difference from related HRESULT values

DB_E_BOOKMARKSKIPPED means the bookmark form is valid but no matching row is found, while DB_E_BADBOOKMARK means the bookmark itself is invalid.

Official Microsoft references


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

Exit mobile version