| title | CRowset::MoveNext | 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 | 0df3288c-2bce-494f-99c0-6344b54a4adf | |||||||||||||
| caps.latest.revision | 10 | |||||||||||||
| author | mikeblome | |||||||||||||
| ms.author | mblome | |||||||||||||
| manager | ghogen | |||||||||||||
| translation.priority.ht |
|
Moves the cursor to the next record.
HRESULT MoveNext( ) throw( );
HRESULT MoveNext(
LONG lSkip,
bool bForward = true
) throw( );
lSkip
[in] The number of rows to skip before fetching.
bForward
[in] Pass true to move forward to the next record, false to move backward.
A standard HRESULT. When the end of the rowset has been reached, returns DB_S_ENDOFROWSET.
Fetches the next sequential row from the CRowset object, remembering the previous position. Optionally, you can choose to skip ahead lSkip rows or move backward.
This method requires that you set the following properties before calling Open on the table or command containing the rowset:
-
DBPROP_CANSCROLLBACKWARDS must be
VARIANT_TRUEiflSkip< 0 -
DBPROP_CANFETCHBACKWARDS must be
VARIANT_TRUEifbForward= false
Otherwise (if lSkip >= 0 and bForward = true), you do not need to set any additional properties.
Header: atldbcli.h
CRowset Class
CRowset::MoveFirst
CRowset::MoveToBookmark
CRowset::MovePrev
CRowset::MoveLast