Move to a record specified by its logical record number in the controlling order.
XSharp.RT (in XSharp.RT.dll) Version: 2.2a
Syntax View Source
nKeyNo AS USUAL
) AS LOGIC
public static bool OrdKeyGoto(
[DefaultParameterValueAttribute(0, 1)] Usual nKeyNo
- Type: Usual
The logical record number. If the value specified does not satisfy the scope or for condition for the order, the record pointer is positioned at the end-of-file.
TRUE if successful; otherwise, FALSE.
OrdKeyGoTo() is the complement to OrdKeyNo(). OrdKeyNo() returns the logical record number (i.e., its position in the controlling order) of the current record, and OrdKeyGoTo() moves the record pointer to the specified logical record.
Tip: This function can be useful when displaying scroll bars. If the user clicks on a certain position on the scroll bar, you can move to the corresponding record by calling OrdKeyGoTo().
By default, this function operates on the currently selected work area. It can be made to operate on an unselected work area by specifying it within an aliased expression
This example shows the difference between physical and logical record number:
SET INDEX TO first // Make records in first name
OrdKeyGoTo(100) // Go to the 100th logical record
? RECNO() // Returns the physical record
? OrdKeyNo() // Returns 100, the logical
// record no