DBF APPEND()

From Recital Documentation Wiki
Jump to: navigation, search

PURPOSE

Append a record


SYNONYM

api_dbf_append()


SYNOPSIS

#include "dbapi.h"
 
int	*DBF_APPEND(blank)
 
<input parameters>
int	blank;		/*blank record	*/
 
<output parameters>
none


DESCRIPTION

The DBF_APPEND() function will append a record into the currently selected database. The current record buffer will be appended unless blank is defined as 1.

The DBF_APPEND() function will return < 0 if an error occurs during the append operation.

Recital performs automatic file locking on shared databases for the append. If the shared database is locked by another user, then the append will wait until the database is unlocked. The append will not be affected by records locked by other users.


EXAMPLE

The following example will append in a record specified in the first parameter passed and return the result.

#include "dbapi.h"
 
dbapi_dbf_append()
{
    int	rc;
 
    if (_parinfo(1) != API_NTYPE) {;
       rc = DBF_APPEND( _parni(1) );
    } else {
       rc = -1
    }
 
    _retni( rc );
}


SEE ALSO

BLOB_UPDATE(), BLOB_WRITE(), DBF_GATHER(), DBF_READ(), DBF_RECBUFFER(), DBF_SELECT(), DBF_UPDATE(), FIELD_UPDATE(), MEMO_UPDATE(), MEMO_WRITE()