| Previous | Next |
| DB_E_BADREGIONHANDLE | DB_E_INVALIDTRANSITION |
DB_E_NONCONTIGUOUSRANGE
Meaning
Windows documents DB_E_NONCONTIGUOUSRANGE as “Set of rows is not contiguous to, or does not overlap, the rows in the watch region”. Here, a requested set of rows neither forms a contiguous range nor overlaps the existing watch region as required.
Relevant OLE DB contract
This result must be interpreted against this contract: OLE DB views and find operations derive row ranges from an accessor, comparison operators, current ordering and region state; handles and containment relationships become stale when the view, filter or rowset generation changes.
Start with the active rowset view, its criteria accessor and the region or row sequence supplied by the consumer when investigating this result.
Diagnostic sequence
- Capture this result immediately at the native OLE DB return and obtain the current OLE DB error object before another COM call replaces thread error information.
- Identify the exact stage: a requested set of rows neither forms a contiguous range nor overlaps the existing watch region as required.
Specific conditions that produce it
- Cause 1: the rows are supplied in discontinuous order.
- Cause 2: the new range has a gap from the watch region.
- Cause 3: stale row handles describe positions from a previous view ordering.
Evidence to collect before changing the system
- Evidence 1: the ordered row-handle list used to define the range.
- Evidence 2: the current watch-region boundaries.
- Evidence 3: sort and filter state that determines row adjacency.
Corrective actions
- Action 1: construct ranges from the current view order.
- Action 2: split disjoint selections into supported region operations.
- Action 3: refresh handles after sort or filter changes.
Retry and recovery policy
Retry rule: retry after supplying a contiguous or overlapping range under the current view ordering.
Difference from related HRESULT values
DB_E_NOTASUBREGION concerns containment, while DB_E_NONCONTIGUOUSRANGE concerns continuity or overlap of the supplied rows.
Practical incident
A UI sends two separated selected blocks as one watch-region extension; issuing two supported operations avoids it.
Official Microsoft references
Looking for a different code? Search another status or error code.
