DbGoto Function (Usual, Usual)
Move to a record specified by record number.
XSharp.RT (in XSharp.RT.dll) Version: 2.4a
Syntax View Source
uRecID AS USUAL,
uArea AS USUAL
) AS LOGIC
public static bool DbGoto(
- Type: Usual
The record number to go to.
If <uRecID> does not exist, the work area is positioned to LastRec() + 1, and both EOF() and BOF() return TRUE.
- Type: Usual
Specifies the work area name or number for a table on which the operation must be performed.
TRUE if successful; otherwise, FALSE.
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 or by calling the that accepts a workarea parameter (a workarea number or alias ).
DbGoTo() performs the same function as the GO command.
For more information, refer to the GO command.
Logical records: DBGoTo() does not respect logical visibility. That is, if the specified record exists, it will become the current record regardless of any order or filter condition.
Shared mode: For a shared file, moving to a different record can cause updates to the current record to become visible to other processes.
The following example uses DbGoTo() to iteratively process every fourth record:
1DBUseArea(TRUE, "DBFNTX", "sales", "Sales", TRUE)
3DO WHILE !EOF()
4 DBGoTo(RecNo() + 4)
5 Sales->Group := "Bear"