QMExecute()

Top  Previous  Next

 

The QMExecute() function executes a command on the server.

 

 

Format

 

VBQMExecute(ByVal Cmnd as String, ByRef Errno as Integer) as String

 

Cchar * QMExecute(char * Cmnd, int * Errno)

 

ObjStr = Session->Execute(Cmnd, Errno)

 

where

 

Cmndis the command to be executed.

 

Errnois an integer variable to receive status information.

 

 

The QMExecute() function executes the specified command on the server. The output from this command is returned as a text string.

 

If the command completes without requesting input, the Errno variable is set to SV_OK.

 

If the command requests input, any output up to that point is returned and the Errno variable is set to SV_PROMPT. The client may respond to this using the QMRespond() function or abort the command using the QMEndCommand() function.

 

On completion of the command, QMStatus() will return the value of @SYSTEM.RETURN.CODE.

 

The executed command may perform most functions of the QM database. Specific restrictions are:

Input may be requested from the client using the QMBasic INPUT and INPUT@ statements. Use of the KEYIN() function is not allowed.

Testing for input using the QMBasic KEYREADY() function or the INPUT -1 syntax will not show input waiting.

The length parameter of an INPUT statement will be ignored if present.

Execution of a further command from within the executed command may not behave correctly.