Difference between revisions of "DBF ALIAS()"
From Recital Documentation Wiki
Yvonnemilne (Talk | contribs) |
Yvonnemilne (Talk | contribs) |
||
Line 30: | Line 30: | ||
The following example returns the alias name of the current workarea, or executes the command specified in the first parameter if no database is open. | The following example returns the alias name of the current workarea, or executes the command specified in the first parameter if no database is open. | ||
− | + | ||
<code lang="c"> | <code lang="c"> | ||
+ | #include <stdio.h> | ||
#include "dbapi.h" | #include "dbapi.h" | ||
Revision as of 10:55, 30 March 2009
PURPOSE
Return alias name
SYNONYM
api_dbf_alias()
SYNOPSIS
#include "dbapi.h" char *DBF_ALIAS() <input parameters> none <output parameters> none
DESCRIPTION
The DBF_ALIAS() function will return will return the alias name of the currently selected workarea as an upper case character string, or a NULL if no database is in use.
Recital provides you with 100 workareas by default, however, up to 256 may be set with the DB_MAXWKA environment variable / symbol.
EXAMPLE
The following example returns the alias name of the current workarea, or executes the command specified in the first parameter if no database is open.
#include <stdio.h> #include "dbapi.h" dbapi_dbf_alias() { char *alias; alias = DBF_ALIAS(); if ( alias == NULL) { COMMAND(_parc(1) ); _retc(""); } else { _retc( alias ); } }
SEE ALSO
DBF_DBF(), DBF_FMT(), DBF_INDEXKEY(), DBF_INDEXORDER(), DBF_ISEXCLUSIVE(), DBF_ISREADONLY(), DBF_NDX(), DBF_SELECT(), DBF_USED()