Skip to content

Latest commit

 

History

History
85 lines (72 loc) · 2.27 KB

File metadata and controls

85 lines (72 loc) · 2.27 KB
title CRowset::MoveToRatio | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-windows
ms.tgt_pltfrm
ms.topic article
f1_keywords
MoveToRatio
CRowset<TAccessor>::MoveToRatio
CRowset::MoveToRatio
CRowset<TAccessor>.MoveToRatio
ATL.CRowset.MoveToRatio
ATL::CRowset::MoveToRatio
CRowset.MoveToRatio
ATL.CRowset<TAccessor>.MoveToRatio
ATL::CRowset<TAccessor>::MoveToRatio
dev_langs
C++
helpviewer_keywords
MoveToRatio method
ms.assetid 1fa313bd-8fd1-4608-8e85-44993b97dd88
caps.latest.revision 10
author mikeblome
ms.author mblome
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

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

See Also

CRowset Class