xHarbour Reference Documentation > Command Reference |
Resumes a pending LOCATE command.
CONTINUE
The CONTINUE command resumes a database search initiated with the LOCATE command in the current work area. The search is continued with the FOR condition specified with the last LOCATE command. The scope restriction and WHILE condition of LOCATE is ignored.
CONTINUE searches for the next record in the current work area that matches the FOR condition of the last LOCATE command issued for the current work area. If a match is found, the record pointer is positioned on this record and the Found() function returns .T. (true). When there is no match, the record pointer is positioned on the ghost record (Lastrec()+1), function Found() returns .F. (false) and function Eof() returns .T. (true).
Each work area can have its own LOCATE condition. It remains active until a new LOCATE command is executed or the work area is closed.
See also: | DbSeek(), Eof(), Found(), LOCATE, SEEK |
Category: | Database commands |
Source: | rdd\dbcmd.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example uses LOCATE and CONTINUE to list customers // living in the city of New York. PROCEDURE MAIN LOCAL cCity := "New York" FIELD FirstName, LastName USE Customer NEW LOCATE FOR Upper(FIELD->City) = Upper(cCity) DO WHILE Found() ? LastName, FirstName CONTINUE ENDDO CLOSE Customer RETURN
http://www.xHarbour.com