getEstimatedRows

Returns an estimate of the total number of rows in the data set. With an asynchronous provider, callers can use this method with OLEDBSimpleProvider::getRowCount to get an estimate of the percentage of data received.

Important

This feature will be removed in a future version of Windows. Avoid using this feature in new development work, and plan to modify applications that currently use this feature. Instead, write a fully functional OLE DB provider using the native OLE DB interfaces.

Syntax

HRESULT getEstimatedRows (
   DBROWCOUNT   *pcRows);

Parameters

  • pcRows
    [out] Estimated number of rows in the data set.

Return Codes

  • S_OK
    The method succeeded.

  • E_FAIL
    A provider-specific error occurred.

Comments

When an estimate of the number of rows cannot be provided, the provider should return a value of -1.

Synchronous providers should not block on a call to OLEDBSimpleProvider::getEstimatedRows. They should either return a value of -1 to indicate that they cannot provide an estimate, or they should provide the actual row count (the same as would be obtained through OLEDBSimpleProvider::getRowCount).

Providers should not return the final row count prior to issuing OLEDBSimpleProviderListener::transferComplete.