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

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

ARGUMENTS
   FIELD       The field type of the key field for which the next 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 next
   occurrence of the key FIELD.Status S_NOTFOUND is returned if there
   are no more keys.db_VISTA keeps track of the relative position of each
   key field so that d_keynext can be performed for multiple keys at a time.
   Also note  so that d_keynext(or the first one after status
   S_NOTFOUND was returned)will return the first key on file.

CURRENCY CHANGES
   curr_rec=record with next key;

RETURN CODES

   0    S_OKAY          Next 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_keyfrst d_keyprev d_keylast

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