DBF RECALL()

From Recital Documentation Wiki
Revision as of 10:22, 30 March 2009 by Yvonnemilne (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

PURPOSE

Recall a deleted record


SYNONYM

api_dbf_recall()


SYNOPSIS

#include "dbapi.h"
 
int	DBF_RECALL()
 
<input parameters>
none
 
<output parameters>
none


DESCRIPTION

The DBF_RECALL() function will return 1 if the current record can be recalled, and 0 if not. A -1 will be returned if no database is open in the current workarea.

On shared databases the record should be locked first before it is recalled. If you attempt to recall a record that is locked by another user, Recital will display an error message.


EXAMPLE

The following example locks, recalls and then unlocks the current record.

#include "dbapi.h"
 
dbapi_dbf_recall()
{
    int	rc;
    long	recnum;
 
    if (DBF_ISEXCLUSIVE()) {
       rc = DBF_RECALL();
    } else {
       recnum = DBF_RECNO();
       DBF_LOCKR( recnum );
       rc = DBF_RECALL();
       DBF_UNLOCKR(recnum);
    }
 
    _retl( rc );
}


SEE ALSO

[[DBF_DELETE(), DBF_DELETED()]], DBF_FETCH(), DBF_FILTER(), DBF_GOTO(), DBF_ISEXCLUSIVE(), DBF_ISREADONLY(), DBF_LOCKF(), DBF_LOCKR(), DBF_RECNO(), DBF_SKIP(), DBF_UNLOCKF(), DBF_UNLOCKR()