COMMAND()

From Recital Documentation Wiki
Jump to: navigation, search

PURPOSE

Execute a Recital command


SYNONYM

api_command()


SYNOPSIS

#include "dbapi.h"
 
int	COMMAND(command)
 
<input parameters>
char	*command;	/* Address of a buffer containing a valid Recital command	*/
 
<output parameters>
none


DESCRIPTION

The COMMAND() function will execute the specified Recital command from within your 'C' function. This function returns 0 if successful, otherwise a Recital error number.


EXAMPLE

The following example will open a Recital database called accounts.

Example Recital program:

m_result=open("use accounts")
return

Example 'C' function:

#include "dbapi.h"
 
dbapi_open()
{
	if (_parinfo(1) == APICTYPE) {
		_retni(COMMAND(_parc(1)));
	} else {
		_retni(-1);
	}
}


SEE ALSO

EXPRESSION()