PreviousActiveX Controls Guide (9.1 revision 1) Next

GetEqual

Show this topic in Library frames

Applies to:

VAccess

Description

Attempts to retrieve a record by an exact match to the current index and returns, as an Integer value, the Pervasive.SQL status code.

Syntax

object.GetEqual [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

Attempts to retrieve the first record in the file which contains a value in the currently selected index field or fields which exactly matches the value specified for the field or fields prior to the operation.

Before invoking this method, set the value of the field or fields which make up the index specified by the IndexNumber property. If the key fields are bound to VA 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 also set in the Status property of the control, a value of zero indicating success.

For the operation to succeed, all bytes of all fields in all segments of the key must be equivalent. A Status Code 4 indicates that the value set in the key field(s) prior to the operation was not found in the current index path. A string key with an alternate collating sequence will return a record if the key value, when translated through the alternate collating sequence, has a byte-for-byte equivalent in the file. This is also true of case-insensitive string keys.

Example

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

Chapter contents
Publication contents

Prev topic: GetDirect
Next topic: GetFirst