SUMMARY d_renfile(dbname,FILEID,filenm) char *db char *value; int dbn;
ARGUMENTS value A pointer to the data to be copied into the the current record.
dbn (optional)The number of the database containing the record
DESCRIPTION This function copies the data from the location pointed to by value into the current record.Key fields will be automatically updated. Sorted sets with sort fields contained in the currend record will be automatically updated.However,where multiple fields in the record is used as sort fields in the same set,better performance will result if you disconect the current record from all orted sets before calling d_recwrite and then reconnect it following the call.
CURRENCY CHANGES None
RETURN CODES 3 S_DUBLICATE Dublicate key.
-7 S_NORC The current record is null.
-24 S_NOTLOCKED Record type of current record is not locked.
-27 S_TRNOTACT Transaction not active.In shared mode charges can only be made from within a transaction.
EXAMPLE /* Modify info record*/ mod_info(id); char id; { if(d_keyfind(ID_CODE,id) == S_OKAY){ d_recread(&irec); /*user edits info data*/ if(edit_info(&irec){ /* okay to update*/ d_recwrite(&irec); } else ... /*edit canceled*/ } else if(db_status==S_NOTFOUND) usermsg("id code not found"); }