PreviousActiveX Controls Guide (9.1 revision 1) Next

GetNext

Show this topic in Library frames

Applies to:

VAccess

Description

Attempts to retrieve the next record in the current index path and returns, as an Integer value, the Pervasive.SQL status code.

Syntax

object.GetNext [vLockBias] 
 

Part
Description
object
Required. The object placeholder represents an object expression that evaluates to an object in the Applies To list.
vLockBias
Optional. Value representing the type of record lock to place on the record when it is retrieved. Default is 0, no lock. One of the following constants:
Const BTO_SingleNoWait = 200
Const BTO_MultiNoWait = 400

Remarks

This method attempts to retrieve the next record in the currently selected index path, set through the IndexNumber property, from the file associated with the control.

Before invoking this method, you must have established current positioning in the index path.

The status code for the operation will be returned by the method and set in the Status property of the control, a value of zero indicating success. A Status Code 9 indicates that there is no record following the current record in the current index path. A Status Code 8 indicates that positioning was not established on a current record prior to invoking the method.

Example

'Delete all records where the date is a year 
'or more old 
Customers.IndexNumber = 0    'customer number 
Customers.GetFirst 
Do 
	If DateDiff("yyyy", Now, _  
		Customers.FieldValue("last_order_date")) > 0 
		Customers.Delete 
	End If 
	Customers.GetNext 
Loop While Customers.Status = 0 

Chapter contents
Publication contents

Prev topic: GetLessOrEqual
Next topic: GetNextExtended