Click or drag to resize

DbServer.OrderKeyGoTo Method

X#
Move to a record specified by its logical record number in the controlling order.

Namespace:  VO
Assembly:  VORDDClasses (in VORDDClasses.dll) Version: 2.21
Syntax
 VIRTUAL METHOD OrderKeyGoTo(
	nKeyNo
) AS USUAL CLIPPER
Request Example View Source

Parameters

nKeyNo (Optional)
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.

Return Value

Type: Usual
TRUE if successful; otherwise, FALSE.
Remarks
DBServer:OrderKeyGoTo() is the complement to DBServer:OrderKeyNo(). DBServer:OrderKeyNo() returns the logical record number (i.e., its position in the controlling order) of the current record, and DBServer:OrderKeyGoTo() moves the record pointer to the specified logical record. DBServer:OrderKeyGoTo() sends a NotifyIntentToMove message before the operation. It also sends a NotifyRecordChange message upon successful completion. Tip: This method 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 DBServer:OrderKeyGoTo().
Examples
This example shows the difference between physical and logical record number:
X#
1oDBCust := Customer{}
2oDBCust:SetIndex("first")     // Make records in first name order
3oDBCust:OrderKeyGoTo(100)         // Go to the 100th logical record
4? oDBCust:RECNO            // Returns the physical record number
5? oDBCust:OrderKeyNo()        // Returns 100, the logical record no
See Also