D_DELETE(1)

NAME
d_delete - delete the current record

SYNOPSIS
#include <typhoon.h>
d_delete()

DESCRIPTION
d_delete removes the current record from its table.
If there is no current record, S_NOCR is returned. If the record has references, i.e. records with foreign keys that reference this record, S_RESTRICT is returned.

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

S_OKAY
    The record was successfully deleted.

S_NOCD
    There is no current database.

S_NOCR
    There is no current record.

S_RESTRICT
    One or more records currently reference this record and the record cannot be deleted.

CURRENCY CHANGES
None.

EXAMPLE
#include <typhoon.h>
if( d_keyfind(CUSTOMER_NAME, "Pedersen") == S_OKAY )
{
    if( d_delete() != S_OKAY )
        /* handle error */
}

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

SEE ALSO
d_fillnew(1)