DBF SKIP()

From Recital Documentation Wiki
Revision as of 17:14, 27 March 2009 by Yvonnemilne (Talk | contribs)

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

PURPOSE

Skip records


SYNONYM

api_dbf_skip()


SYNOPSIS

#include "dbapi.h"
 
int	DBF_SKIP(amount)
 
<input parameters>
int	amount;			/* Number of records	*/
 
<output parameters>	
none


DESCRIPTION

The DBF_SKIP() function moves the record pointer forwards or backwards in the currently selected database. The amount may be a positive or negative value.

If the currently selected database is indexed, then the DBF_SKIP() function follows the order of the master index. The Recital SET ORDER TO command can be used to select which of the open index files should be master.

If the record pointer is currently positioned on the first record of the database, and DBF_SKIP(-1) is specified, then the DBF_ISBOF() function will return 1. If the record pointer is currently positioned on the last record of the database and DBF_SKIP(1) is specified, then the DBF_ISEOF() function will return 1.

The record pointer will also be moved on any related databases.


EXAMPLE

The following example will skip the number of records specified in the first parameter passed.

#include "dbapi.h"
 
dbapi_dbf_skip()
{
    int	rc;
 
    if (_parinfo(1) == API_NTYPE) {
       rc = DBF_SKIP(_parni(1));
    } else {
       rc = -1;
    }
 
    _retni( rc );
}
 
==SEE ALSO==
[[DBF_DELETED()]], [[DBF_FETCH()]], [[DBF_FILTER()]], [[DBF_GOTO()]], [[DBF_ISBOF()]], [[DBF_ISEOF()]], [[DBF_LOCKR()]], [[DBF_RECNO()]], [[DBF_SEEK()]], [[DBF_UNLOCKR()]]
 
[[Category:Documentation]]
[[Category:SDK]]