| title | CRowset::MoveToRatio | Microsoft Docs | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| ms.custom | ||||||||||||||
| ms.date | 11/04/2016 | |||||||||||||
| ms.reviewer | ||||||||||||||
| ms.suite | ||||||||||||||
| ms.technology |
|
|||||||||||||
| ms.tgt_pltfrm | ||||||||||||||
| ms.topic | article | |||||||||||||
| f1_keywords |
|
|||||||||||||
| dev_langs |
|
|||||||||||||
| helpviewer_keywords |
|
|||||||||||||
| ms.assetid | 1fa313bd-8fd1-4608-8e85-44993b97dd88 | |||||||||||||
| caps.latest.revision | 10 | |||||||||||||
| author | mikeblome | |||||||||||||
| ms.author | mblome | |||||||||||||
| manager | ghogen | |||||||||||||
| translation.priority.ht |
|
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.
Header: atldbcli.h