DbServer.OrderKeyGoTo Method (Typed) | |
Move to a record specified by its logical record number in the controlling order.
Namespace:
XSharp.VO.SDK
Assembly:
XSharp.VORDDClasses (in XSharp.VORDDClasses.dll) Version: 2.19
Syntax VIRTUAL METHOD OrderKeyGoTo(
nKeyNo AS LONG
) AS LOGIC
public virtual bool OrderKeyGoTo(
int nKeyNo
)
Request Example
View SourceParameters
- nKeyNo
- Type: Long
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:
Logic
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