RDD

DbSeek()

Move to the record having a specified key

Syntax

Signature
DbSeek( expKey, [lSoftSeek], [lLast] ) --> lFound

Arguments

expKey

Key value. lSoftSeek Allows the next greater key. lLast Searches the last equal key.

Return value

.T. when a matching key is found; otherwise .F..

Description

DbSeek() searches the controlling order of the current work area and moves the record pointer to the selected key.

Notes

An order must be active. Soft seek behavior follows the current settings.

Example

DbSeek.prg
PROCEDURE Main()

   DbUseArea( .T., , "people.dbf", "People" )
   QOut( "Found: " + IIF( DbSeek( "Anna" ), "YES", "NO" ) )
   DbCloseArea()

RETURN

Output

See also