PreviousActiveX Controls Guide (9.1 revision 1) Next

GetGreaterOrEqual

Show this topic in Library frames

Applies to:

VAccess

Description

Attempts to retrieve the first record that is greater than or equal to the key in the current index path and returns, as an Integer value, the Pervasive.SQL status code.

Syntax

object.GetGreaterOrEqual [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 first record which contains a value in the currently selected key field(s) which is greater than or equal to the value specified for the field(s) prior to the operation, from the file associated with the control.

Before invoking this method, set the value of the field or fields which make up the index specified in the IndexNumber property.

If the key fields are bound to field controls, their value will be set by modifying the contents of the bound controls. To set these values from code, use the FieldValue property.

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 no records in the file have a key value greater than or equal to that specified prior to the operation.

Example

If Check1.Value = 1 Then
   stat = VAccess1.GetEqual
Else
   stat = VAccess1.GetGreaterorEqual
End If 

Chapter contents
Publication contents

Prev topic: GetGreater
Next topic: GetLast