DBF SELECT()

From Lianjapedia
Jump to: navigation, search

PURPOSE

Select a workarea/cursor

SYNONYM

api_dbf_select()

SYNOPSIS

#include "lianja_api.h"
 
int	DBF_SELECT(workarea)
 
<input parameters>
int	workarea;		/* Workarea to select	*/
 
<output parameters>
none

DESCRIPTION

The DBF_SELECT() function will select the specified workarea.

Each workarea contains the context for the table which has been opened in that workarea, including: the current record pointer, the current record, the current record buffer, the format file, the index files, the filter condition, and the relationships to other workareas.

EXAMPLE

The following example selects the workarea specified in the first parameter passed.

#include "lianja_api.h"
 
lianjaapi_dbf_select()
{
    int	rc;
 
    if (_parinfo(1) == API_NTYPE) {
       rc = DBF_SELECT(_parni(1));
    } else {
       rc = -1;
    }
 
    _retni( rc );
}

SEE ALSO

DBF_ALIAS(), DBF_DBF(), DBF_USED()