Note | This command is defined in a header file and will be preprocessed by the X# preprocessor to a function call. If you disable the standard header (-nostddefs) files then this command will not be available. If you tell the compiler to use a different standard header file (-stddef ) then this command may also be not available |
Move the pointer to the specified record.
GO[TO] <uRecID> | TOP | BOTTOM [[IN|ALIAS] <workarea>]
<uRecID> | The record to go to. The data type and interpretation of <uRecID> is determined by the RDD. For .DBF files, it is the record number. If <uRecID> does not exist, the work area is positioned to LastRec() + 1, and both EoF() and BoF() return TRUE. |
TOP | Specifies the first logical record in the current work area. |
BOTTOM | Specifies the last logical record in the current work area. |
IN|ALIAS <workarea> | Specifies the work area for which the operation must be performed |
Visibility: Even though a particular record may not be visible (because, for example, of DbSetFilter(), SetDeleted(TRUE), or a conditional controlling order), you can still go to that record.
This example saves the current record number, searches for a key, then restores the record pointer to the saved position:
FUNCTION KeyExists(uKeyExpr)
LOCAL nSavRecord := RECNO()
// Save the current record pointer position
LOCAL lFound
SEEK uKeyExpr
IF (lFound := Found())
.
. <Statements>
.
ENDIF
GOTO nSavRecord // Restore the record pointer
// position
RETURN lFound
XSharp.RT.DLL
DbGoTo(), DbSetFilter(), DBSetRelation(), LastRec(), RecNo(), SetDeleted() , SET RELATION, SKIP