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 v5.5 - ax_keyval() http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 AX_KeyVal()
 Returns the key value for the current record in the specified index order
------------------------------------------------------------------------------

 Syntax

     AX_KeyVal( [<cOrder>|<nPosition> ], [<cCDXName>] ) -> key value

     <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 key value for the current record in the current
     or specified index. Returns NIL if an error occurred or no key
     exists in the specified index for the current record.

 Description

     This function returns the key value for the current record for
     the current or specified index order.

     Note: AX_KeyVal() will NOT work as quickly as the equivalent
     function available in non-client/server RDDs. Since Advantage is
     client/server, no index data is ever stored on the client PC. Thus,
     the Advantage RDD on the client must retrieve the key value from
     the index file located on the file server via the Advantage
     Database Server.

 Example

     USE test VIA "DBFCDXAX"             // Open a table
     INDEX ON last TO last CUSTOM        // Create a custom index

     GOTO 10                             // Select record 10
     AX_KeyAdd()                         // Add a key for record 10
     GOTO 20                             // Select record 20
     AX_KeyAdd()                         // Add a key for record 20

     GOTO 10                             // Select record 10
     ? AX_KeyVal()                       // Displays key value for this rec
     GOTO 50                             // Select record 50
     ? AX_KeyVal()                       // Displays NIL because no key
                                         // exists for this record.


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