D_RECWRITE (1)
update the current record
SYNOPSIS
#include <typhoon.h>
d_recwrite(void *buf)
DESCRIPTION
d_recwrite updates the contents of the current record.
DIAGNOSTICS
The status code returned by the function is also stored in the global
variable db_status.
S_OKAY
The record was successfully updated.
S_NOCD
There is no current database.
S_NOCR
There is no current record.
S_INVREC
The record id is not valid.
S_DUPLICATE
One of the keys in the record would cause duplicates in a unique index.
db_subcode contains the id of the conflicting field or key.
S_RECSIZE
A length determinator of a variable length field contained a illegal
value. db_subcode contains the id of the conflicting field.
S_FOREIGN
The target of a foreign key could not be found. db_subcode contains
the id of the target table.
CURRENCY CHANGES
EXAMPLE
#include <typhoon.h>
struct customer cust;
strcpy(cust.name, "Pedersen");
if( d_keyfind(CUSTOMER_NAME, &cust.name) == S_OKAY )
{
d_recread(&cust);
cust.account = 2000;
if( d_recwrite(&cust) != S_OKAY )
/* handle error */
}
IDENTIFICATION
Author: Thomas B. Pedersen.
Copyright (c) 1994 Thomas B. Pedersen.
SEE ALSO
- d_fillnew (1) -
- d_recread (1) -
Id Rv $3 Dt $4 iD $3 $4 $5 $6 $7 $Id: d_setfiles (3) v 1 1 1995/06/12 18:58:16 tbp Exp $ r s-1TYPHOON s0 n ds - %-- t ds - (em
|