xHarbour Reference Documentation > Command Reference xHarbour Developers Network  

CONTINUE

Resumes a pending LOCATE command.

Syntax

CONTINUE

Description

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.

Info

See also:DbSeek(), Eof(), Found(), LOCATE, SEEK
Category: Database commands
Source:rdd\dbcmd.c
LIB:xhb.lib
DLL:xhbdll.dll

Example

// 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

Copyright © 2006-2007 xHarbour.com Inc. All rights reserved.
http://www.xHarbour.com
Created by docmaker.exe