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_keyfrst http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   D_KEYFRST

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

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

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

DESCRIPTION
   Function d_keyfrst finds a record occurence associated with the first
   occurrence of the key FIELD .

CURRENCY CHANGES
   curr_rec=record with first key;

RETURN CODES

   0    S_OKAY          First 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 id_code order*/
    for(d_keyfrst(ID_CODE);db_status == S_OKAY;
            d_keynext(ID_CODE)){
       d_recread(&irec);
       .. /*print info record contens*/
    }

See Also: d_keyfind d_keylast d_keyprev d_keynext

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