RDD

OrdKeyCount()

Return the number of keys in an order

Syntax

Signature
OrdKeyCount( [cOrder | nPosition], [cIndexFile] ) --> nKeys

Arguments

Optional order selector and index file.

Return value

Number of keys in the selected order.

Description

OrdKeyCount() returns the count of keys stored in an order.

Notes

The count can differ from the physical record count when an order is scoped or filtered.

Example

OrdKeyCount.prg
PROCEDURE Main()

   DbUseArea( .T., , "people.dbf", "People" )
   QOut( "Keys: " + LTrim( Str( OrdKeyCount( 1 ) ) ) )
   DbCloseArea()

RETURN

Output

See also