| Previous | Next |
| IDS_MON_INVALID_IN_GROUP_CLAUSE | DB_S_COLUMNTYPEMISMATCH |
DB_S_ROWLIMITEXCEEDED
OLE DB row-handle limit reached with partial fetch
DB_S_ROWLIMITEXCEEDED is HRESULT 265920 (0x00040EC0) from Microsoft OLE DB. AllStat describes DB_S_ROWLIMITEXCEEDED as “Fetching requested number of rows will exceed total number of active rows supported by the rowset.” The high-order severity bit is clear, so this is a success result, but it carries more information than plain S_OK.
The rowset returned available rows but could not fetch the full request because doing so would exceed the provider’s active-row limit.
Evidence and telemetry to preserve
- For
DB_S_ROWLIMITEXCEEDED, preserve requested and obtained row counts. - For
DB_S_ROWLIMITEXCEEDED, preserve active HROW count. - For
DB_S_ROWLIMITEXCEEDED, preserve provider row-limit property. - For
DB_S_ROWLIMITEXCEEDED, preserve fetch direction and starting position. - For
DB_S_ROWLIMITEXCEEDED, preserve ReleaseRows results.
Also record db_s_rowlimitexceeded_operation, db_s_rowlimitexceeded_object, db_s_rowlimitexceeded_state_before, db_s_rowlimitexceeded_state_after, UTC time, process and thread identifiers, and a correlation ID. For DB_S_ROWLIMITEXCEEDED, keep secrets out of logs while retaining GUIDs, CLSIDs, media subtypes, property IDs, row identities, and hashes needed to distinguish objects.
Where this result is encountered
DB_S_ROWLIMITEXCEEDEDcan appear in IRowset::GetNextRows; record the producing interface and method rather than inferring behavior from the symbolic name alone.DB_S_ROWLIMITEXCEEDEDcan appear in rowset consumers holding many HROW values; record the producing interface and method rather than inferring behavior from the symbolic name alone.DB_S_ROWLIMITEXCEEDEDcan appear in providers enforcing a maximum number of simultaneously active rows; record the producing interface and method rather than inferring behavior from the symbolic name alone.
For DB_S_ROWLIMITEXCEEDED, the same numeric success value can be mishandled when a wrapper exposes only a Boolean. For DB_S_ROWLIMITEXCEEDED, keep the original HRESULT until the code-specific outputs and state transition have been evaluated.
State boundary that must be proved
The central question for DB_S_ROWLIMITEXCEEDED is whether the consumer uses the returned row count, releases unneeded HROW handles, and does not assume the requested count was satisfied. For DB_S_ROWLIMITEXCEEDED, the HRESULT alone confirms neither unrelated work nor the quality of optional outputs.
A reliable interpretation of DB_S_ROWLIMITEXCEEDED names the exact method contract, the object generation, and the outputs that remain valid. For DB_S_ROWLIMITEXCEEDED, this prevents a success-with-information result from being promoted to full success or demoted to a generic error.
Diagnostic sequence
- For
DB_S_ROWLIMITEXCEEDED, capture the raw HRESULT0x00040EC0immediately after the returning method and record whether the caller usedSUCCEEDED,FAILED, equality testing, or exception translation. - Identify the exact owner of
DB_S_ROWLIMITEXCEEDED: interface, method, object instance, provider or filter version, thread or apartment, and operation phase. - Validate the decisive contract boundary for
DB_S_ROWLIMITEXCEEDED: the consumer uses the returned row count, releases unneeded HROW handles, and does not assume the requested count was satisfied. - For
DB_S_ROWLIMITEXCEEDED, inspect every output parameter, count, status array, returned interface, or side effect that the method documentation associates with this success-with-information result. - Compare the observed state before and after
DB_S_ROWLIMITEXCEEDED; do not assume that a success severity bit means every optional sub-operation completed. - For
DB_S_ROWLIMITEXCEEDED, reproduce the smallest request with the same object state and then change only the condition identified by the evidence before repeating the operation.
Difference from nearby HRESULT values
DB_S_ENDOFROWSET is caused by the rowset boundary; DB_S_STOPLIMITREACHED is caused by another resource limit that prevents continuation.
For DB_S_ROWLIMITEXCEEDED, this distinction determines whether the caller should consume partial outputs, stop iteration, wait, reconfigure, notify the user, or perform no error recovery at all.
Correct handling, retry, and recovery
Process the rows actually returned, release handles promptly, and fetch again only after capacity is available. Increasing batch size cannot fix a provider active-row limit.
Retry DB_S_ROWLIMITEXCEEDED only when the recorded state can change the documented outcome. For DB_S_ROWLIMITEXCEEDED, repeating the same call is inappropriate for a stable end marker, cancellation, unsupported format, adjusted property, or partial result whose completed side effects have not been reconciled.
Practical validation scenario
A client requests 500 rows while retaining 900 handles from earlier batches. The provider returns 100 rows with DB_S_ROWLIMITEXCEEDED; the client releases processed rows and continues without losing position.
The negative test should preserve the condition that produces DB_S_ROWLIMITEXCEEDED; the recovery test should alter only that condition and verify the final state as well as the HRESULT.
Developer and administrator guidance
Developers should represent DB_S_ROWLIMITEXCEEDED as a distinct typed outcome, because collapsing it into generic success loses the condition encoded by 0x00040EC0. For DB_S_ROWLIMITEXCEEDED, administrators and support engineers should retain the first component-specific evidence before wrappers replace it with a broad message.
A support report for DB_S_ROWLIMITEXCEEDED should include decimal 265920, hexadecimal 0x00040EC0, the AllStat meaning, the owning API, and the first detailed status or output that explains why the method did not return ordinary S_OK.
References
- Microsoft: OLE DB return codes — official documentation relevant to
DB_S_ROWLIMITEXCEEDED. - Microsoft: OLE DB Driver return codes — official documentation relevant to
DB_S_ROWLIMITEXCEEDED. - Microsoft: OLE DB error records — official documentation relevant to
DB_S_ROWLIMITEXCEEDED. - Microsoft: IRowset::GetNextRows — official documentation relevant to
DB_S_ROWLIMITEXCEEDED.
Looking for a different code? Search another status or error code.