DbServer.OrderKeyGoTo Method | |
Move to a record specified by its logical record number in the controlling order.
Namespace:
VO
Assembly:
VORDDClasses (in VORDDClasses.dll) Version: 2.19
Syntax VIRTUAL METHOD OrderKeyGoTo(
nKeyNo
) AS USUAL CLIPPER
[ClipperCallingConventionAttribute(new string[] { ... })]
public virtual Usual OrderKeyGoTo(
Usual nKeyNo = default
)
Request Example
View SourceParameters
- 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:
1oDBCust := Customer{}
2oDBCust:SetIndex("first")
3oDBCust:OrderKeyGoTo(100)
4? oDBCust:RECNO
5? oDBCust:OrderKeyNo()
See Also