Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Advantage CA-Clipper Guide v6.11 - aofkeycount() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 aofKeyCount()
 Returns the number of records that pass the Client Advantage Optimized
 Filter and are within the index scope
------------------------------------------------------------------------------

Syntax

     aofKeyCount( [<cOrder> | <nPosition> ], [<cCDXName>] ) -> numeric

     <cOrder>  A literal filename or character string specifying the
     name of the order. Using the order name is the preferred method since
     the position may be difficult to determine using multiple-order index
     files. If omitted or NIL, the controlling order is assumed.

     <nPosition>  Assumed to be the number representing the position
     of an order in the active index file or specified index file
     (in <cCDXName>). If not a valid order position within the active or
     selected index file, then is assumed to be an index file order. If
     omitted or NIL, the controlling order is assumed.

     <cCDXName>  The name of an index file, including an optional
     drive and directory (no extension should be specified). Use this
     argument with <cOrder> to remove ambiguity when there are two or
     more orders with the same name in different index files.

Returns

     Returns the number of records which meet the filter condition in the
     system-owned filter and fall within the scope of the current or
     specified index.

Description

     aofKeyCount() is similar to aofCountRecords(), but returns the number
     of records which meet the system-owned filter condition AND which
     are within the scope of the current or specified index.

     If the current or specified index contains a FOR clause, is UNIQUE,
     or in some other way has fewer than all records for the table
     in it, then aofKeyCount() will be the number of records which meet
     the filter condition and are contained in the index.

     aofKeyCount() also obeys the scope on the current or specified
     index, if one exists. So, aofKeyCount() will only count the number
     of records which meet the filter condition and those that fall within
     the current or specified index scope.

     Note:  When aofKeyCount() is performed, and the system-owned
     filter is only partially optimized, then the filter will be
     automatically resolved into a fully optimized filter before the
     actual count record operation takes place. This is to ensure an
     accurate record count is returned.

Example

     INDEX ON age TO age FOR last = 'J'
     INDEX ON salary TO salary

     USE employee INDEX age, salary

     // Create a system-owned filter
     aofSetFilter( "salary >= 75000" )

     // Get the number of records with salary >= 75000 and who's
     //  last name starts with 'J'
     ? aofKeyCount( "age" )


See Also: aofCountRecords() aofResolvePartial() aofKeyGoto()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson