Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- SIx Driver RDD v3.00 - Reference Guide - <b>sx_keydata():</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
  Sx_KeyData():

  Syntax:  Sx_KeyData([[nTagNo | cTagName,] nOrder | cIndexName])

           nTagNo     = Position of tag within compound index file
           cTagName   = Name of the tag
           nOrder     = Position of index in list of indexes
           nIndexName = Name of the index

  Returns:   <?> Current key value for the current or specified index
                  NIL if an error occurred.

  Description:    This function returns the key value for the current record
                  for the current or specified tag or index.

                  If no arguments are specified, then Sx_KeyData() uses the
                  current index file and current tag (if applicable).  If
                  only one argument is supplied, then nOrder/cIndexName is
                  assumed.  0 (zero) can be used for either nTagNo or nOrder
                  to specify the current tag or index, respectively.

    NOTE:  This function is NOT supported under SIXNTX.

  Example:

    #include "SIXCDX.CH"

    // Create a standard Roll-Your-Own (RYO) Index

    USE test VIA "SIXCDX"               // Open database
    INDEX ON last TO last EMPTY         // Create EMPTY index file
    GOTO 10                             // Select a record
    Sx_KeyAdd()                         // Add a key for this record
    ? Sx_KeyData()                      // Displays key value for this rec

    // Create a Multi-Keyed, Free-Format RYO Index

    INDEX ON sxChar(12) TO phones       // Create empty index file
    GOTO 100                            // Select a record
    Sx_KeyAdd( 0,0,"213-555-1212" )     // Add one phone number for this rec
    Sx_KeyAdd( 0,0,"213-555-9999" )     // Add another to the same record
    Sx_KeyAdd( 0,0,"310-222-9876" )     // And yet another phone number!

    // Now display all phone numbers for this record
    IF Sx_FindRec( 100, .F. )           // Find first key for this record
      ? Sx_KeyData()                    // Display first phone number
      DO WHILE Sx_FindRec( 100, .T. )   // Find any other keys for this rec
        ? Sx_KeyData()                  // Display other phone numbers
      ENDDO
    ENDIF



See Also: Sx_KeyAdd() Sx_KeyDrop() Sx_KeyCount() Sx_KeyNo()

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