Function DbGoto() Foundation
Positions the record pointer to a specific record.
DbGoto( <xRecordID> ) --> NIL
The return value of DbGoto() is always NIL.
The database function DbGoto() sets the current record in a work area. When the function is used without the alias operator, the data record is set in the current work area. A value clearly identifying the desired record must be passed to the function. For DBF files this is the record number (RecNo()). With other file formats, this might be something else, such as the value for the primary key.
The command GO can be used instead of DbGoto(). GO is effective only in the current work area.
The function works with the physical records in a file and does not necessarily equate to logical records. Therefore, any record can be accessed with DbGoto() even if it does not meet the current filter condition or is marked as "deleted" and SET DELETED ON is active. If the value for <xRecordID> is not found in the file, DbGoto() positions the record pointer to the "phantom record" (for DBF files it is LastRec()+1). The functions Bof() and Eof() then return the value .T. (true).
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.