D_FILLNEW

SUMMARY
d_fillnew (REC,value[,dbn])
int REC;
char *value;
int dbn;

ARGUMENTS

REC The record type that will be created.

value A pointer to the contents of new record ,usually a struct
variable address.

dbn (optional) The number of the databse containing the record.


DESCRIPTION
Function d_fillnew creates a new record occurence of type REC on the
datbase and fills it with the data pointed to by value.If the record
contains key fields,they will automatically inserted into the correct
key file(s) except for optional key fields,which can be only created using
function d_keystore.If any key field is unique and the data in the field
is not unique,status S_DUPLICATE is returned and the record is not created.
This function will not perform any set connections.

CURRENCY CHANGES

curr_rec=database address of created record;


RETURN CODES


3 S_DUPLICATE Duplicate key. One of unique keys already exists in
the key file.

-3 S_INVREC Invalid record type specified. Perhaps you passed a set
or field type instead.

-24 S_NOTLOCKED Record type not locked.

-27 S_TRNOTACT Transaction not active.In shared mode,changes can only
be made from within a transaction.

-900 S_NOSPACE No more space on file db_VISTA received awrite error
while trying to expand the file.

-909 S_RECLIMIT Maximum records per file limit has been reached. You
have 16,777,215 records on file

EXAMPLE

struct info irec;
....
/* create new tech. info record */
if (d_fillnew(INFO,&irec)==S_DUPLICATE)
printf (@duplicate id_code %s\n",id_code);
else
{
/* conect to appropriate sets */
......