다음을 통해 공유


CRowset::MoveToRatio

Fetches rows starting from a fractional position in the rowset.

HRESULT MoveToRatio( 
   DBCOUNTITEM nNumerator, 
   DBCOUNTITEM nDenominator, 
   bool bForward = true  
) throw( );

매개 변수

  • 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.

반환 값

A standard HRESULT.

설명

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.

요구 사항

헤더: atldbcli.h

참고 항목

참조

CRowset 클래스