D_KEYREAD(1)

NAME
d_keyread - read the most recently found key

SYNOPSIS
#include <typhoon.h>
d_keyread(void *buf)

DESCRIPTION
d_keyread copies the contents of the most recently accessed key field specified by fieldid into the buffer buf. This can be used to determine the contents of a key's fields without actually reading the record.

DIAGNOSTICS
The status code returned by the function is also stored in the global variable db_status.

S_OKAY
    Operation successful.

S_NOCD
    There is no current database.

S_NOCR
    There is no current record.

None.

EXAMPLE
/* Find the smallest customer name */
#include <typhoon.h>
if( d_keyfrst(CUSTOMER_NAME) == S_OKAY )
{
    char name[30];
    d_keyread(name);
    printf("Name %s\n", name);
}

IDENTIFICATION
Author: Thomas B. Pedersen.
Copyright (c) 1994 Thomas B. Pedersen.

SEE ALSO
d_recread(1), d_crread(1)