RDD

LastRec()

Return the number of records in the current file

Syntax

Signature
LastRec() --> nRecords

Arguments

None.

Return value

Number of records in the current database file.

Description

LastRec() returns the physical record count of the current work area.

Notes

It is an alias-style count and does not depend on the current record position.

Example

LastRec.prg
PROCEDURE Main()

   DbUseArea( .T., , "people.dbf", "People" )
   QOut( "Records: " + LTrim( Str( LastRec() ) ) )
   DbCloseArea()

RETURN

Output

See also