What does HRESULT 0x00040EC0 (DB_S_ROWLIMITEXCEEDED) mean?

 
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. The documented description is “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 to preserve

  • Preserve requested and obtained row counts.
  • Preserve active HROW count.
  • Preserve provider row-limit property.
  • Preserve fetch direction and starting position.
  • Preserve ReleaseRows results.

Where the result is encountered

  • This result can appear in IRowset::GetNextRows; record the producing interface and method.
  • This result can appear in rowset consumers holding many HROW values; record the producing interface and method.
  • It can appear in providers enforcing a maximum number of simultaneously active rows; record the producing interface and method.

State to verify

The central question is whether the consumer uses the returned row count, releases unneeded HROW handles, and does not assume the requested count was satisfied.

Diagnostic sequence

  • Capture the raw HRESULT 0x00040EC0 immediately after the returning method and record whether the caller used SUCCEEDED, FAILED, equality testing, or exception translation.

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.

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.

Practical validation scenario

A client requests 500 rows while retaining 900 handles from earlier batches. The provider returns 100 rows with it; the client releases processed rows and continues without losing position.

References


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