Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The latest version of this topic can be found at CRowset::MoveToRatio.
Fetches rows starting from a fractional position in the rowset.
Syntax
HRESULT MoveToRatio(
DBCOUNTITEM nNumerator,
DBCOUNTITEM nDenominator,
bool bForward = true
) throw( );
Parameters
nNumerator
[in] The numerator used to determine the fractional positional from which to fetch data.
nDenominator
[in] The denominator used to determine the fractional positional from which to fetch data.
bForward
[in] Indicates whether to move forward or backward. The default is forward.
Return Value
A standard HRESULT.
Remarks
MoveToRatio fetches rows according roughly to the following formula:
( nNumerator * RowsetSize ) / nDenominator
where RowsetSize is the size of the rowset, measured in rows. The accuracy of this formula depends on the specific provider. For details, see IRowsetScroll::GetRowsAtRatio.
This method requires the optional interface IRowsetScroll, which might not be supported on all providers; if this is the case, the method returns E_NOINTERFACE. You must also set DBPROP_IRowsetScroll to VARIANT_TRUE before calling Open on the table or command containing the rowset.
Requirements
Header: atldbcli.h