| Previous | Next |
| DB_E_BADORDINAL | DB_E_DATAOVERFLOW |
DB_E_PENDINGCHANGES
Meaning
Windows documents DB_E_PENDINGCHANGES as “Pending changes exist on a row with a reference count of zero”. In this case, a row whose external reference count reached zero still has deferred changes that prevent complete release.
Relevant contract
Deferred-update rowsets retain pending inserts, updates and deletes until IRowsetUpdate::Update or Undo resolves them. Rows with reference count zero can remain active solely because pending state still exists, and provider limits can count those rows.
Investigation of this result should start with the rowset generation, HROW state, pending-status array and granted update properties.
Evidence to collect
When recording diagnostic data involving changed row values, keys and original-value snapshots, use types, lengths, hashes or redacted identifiers rather than secrets or complete business data.
- Evidence 1: row pending status before ReleaseRows.
- Evidence 2: per-row status returned during release or update.
- Evidence 3: whether original and changed values remain cached.
Conditions that specifically lead to it
- Cause 1: the consumer released HROW without calling Update or Undo.
- Cause 2: a wrapper lost the last visible reference while pending state remained.
- Cause 3: shutdown cleanup releases handles before resolving the deferred-update transaction.
Diagnostic sequence
- Identify the exact failing stage: a row whose external reference count reached zero still has deferred changes that prevent complete release.
Retry and recovery
Retry rule: retry the release path after pending changes have been transmitted or undone.
Corrective actions
- Action 1: call Update for intended changes before final release.
- Action 2: call Undo for abandoned changes.
- Action 3: make the edit object own both HROW lifetime and pending-state resolution.
Practical scenario
A form closes and drops its HROW while an unsaved edit remains; an explicit save-or-discard decision resolves the pending row.
Difference from nearby HRESULT values
DB_E_MAXPENDCHANGESEXCEEDED prevents adding more pending rows, while DB_E_PENDINGCHANGES reports unresolved state on a row being released.
Official Microsoft references
Looking for a different code? Search another status or error code.