Determine the number of records in the current database (.dbf) file

     RECCOUNT()* | LASTREC() --> nRecords


     RECCOUNT() returns the number of physical records in the current
     database file as an integer numeric value.  Filtering commands such as
     SET FILTER or SET DELETED have no affect on the return value.
     RECCOUNT() returns zero if there is no database file open in the current
     work area.


     RECCOUNT() is a database function that is a synonym for LASTREC().  By
     default, RECCOUNT() operates on the currently selected work area.  It
     will operate on an unselected work area if you specify it as part of an
     aliased expression (see example below).  Note that RECCOUNT() is a
     compatibility function.  LASTREC() should be used in its place.


     .  This example illustrates the relationship between COUNT and

        USE Sales NEW
        ? RECCOUNT()                      // Result: 84
        SET FILTER TO Salesman = "1001"
        COUNT TO nRecords
        ? nRecords                        // Result: 14
        ? RECCOUNT()                      // Result: 84

     .  This example uses an aliased expression to access the number
        of records in an unselected work area:

        USE Sales NEW
        USE Customer NEW
        ? RECCOUNT(), Sales->(RECCOUNT())

 Files   Library is CLIPPER.LIB.

See Also: COUNT

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.