Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- db_VISTA III - d_keylast http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   D_KEYLAST

SUMMARY
   d_keylast(FIELD[,dbn])
   long FIELD;
   int dbn;

ARGUMENTS
   FIELD       The field type of the key field for which the last key
               will be found.

   dbn         (optional) The number of the database containing the record.

DESCRIPTION
   Function d_keylast finds a record occurence associated with the last
   occurrence of the key FIELD .

CURRENCY CHANGES
   curr_rec=record with last key;

RETURN CODES

   0    S_OKAY          Last key was found.

   2    S_NOTFOUND      There are no keys on file for specified key field.

  -5    S_INVFLD        Invalid field type.You either did not pass a
                        field type or yuo passed field type which is
                        not in the current record.

  -17   S_NOTKEY        FIELD is not defined as a key.

  -24   S_NOTLOCKED     Key file containing FIELD is not locked.


EXAMPLE
    /*display all info records in reverse id_code order*/
    for(d_keylast(ID_CODE);db_status == S_OKAY;
            d_keyprev(ID_CODE)){
       d_recread(&irec);
       .. /*print info record contens*/
    }

See Also: d_keyfind d_keyfrst d_keyprev d_keynext

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