Get Greater (8)
The Get Greater operation (B_GET_GT) retrieves a record in which the field specified by the Key Number has the next greater value than the one in the Key Buffer. If the key allows duplicates, this operation retrieves the first record (chronologically) of the group with the same key values. You can use the Get Key (+50) bias to detect the presence of a value in a file. A Get Key operation is generally faster.
*Note: If you are using the Get Greater operation on descending keys, the next greater value refers to a value lower than the one specified in the Key Buffer.
Parameters
 
Prerequisites
Procedure
1
For more information about locking, refer to the Pervasive PSQL Programmer's Guide.
2
3
4
5
Result
If the Get Greater operation is successful, the transactional interface stores the record in the Data Buffer, the key value in the Key Buffer, and the length of the record in the Data Buffer Length parameter.
If the Get Greater operation is unsuccessful, the transactional interface returns one of the following status codes:
Positioning
The Get Greater operation establishes the complete logical and physical currencies and makes the retrieved record the current one.