D_RECNEXT (1)
find the next record in a table
SYNOPSIS
#include <typhoon.h>
d_recnext(ulong recid)
DESCRIPTION
d_recnext finds the next record in the table specified by
recid. If d_recnext returns S_NOTFOUND the table
is empty.
DIAGNOSTICS
The status code returned by the function is also stored in the global
variable db_status.
S_OKAY
S_NOTFOUND
The key value was not found, i.e. the index is empty.
S_NOCD
There is no current database.
S_INVREC
The id is not a record id.
CURRENCY CHANGES
If S_OKAY is returned, the record found becomes the current record.
EXAMPLE
/* Traverse the customers in randomorder */
#include <typhoon.h>
d_recfrst(CUSTOMER);
while( db_status == S_OKAY )
{
struct customer cust;
d_recread(&cust);
printf("%s\\n", cust.name);
d_recnext(CUSTOMER);
}
IDENTIFICATION
Author: Thomas B. Pedersen.
Copyright (c) 1994 Thomas B. Pedersen.
SEE ALSO
|
|