CALL_STORED_PROCEDURE

Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex

This command is used to call a stored procedure on the SQL backend. To successfully call a procedure with this command, a string must be passed containing a valid procedure name. In addition, if the procedure takes any arguments, they must also be passed using the constant “passing” along with all of the needed arguments. If the procedure has a return value, then SQL_GET_FUNCTION_RETURN or SQL_FETCH_NEXT_ROW can be used to get the value(s). If an error is found then the indicator “Err” is set to true.

Syntax

Parameter

Description

procedure

Full name of the procedure

variable

Argument being passed (can be multiple)

Example

CALL_STORED_PROCEDURE "sys.sp_addmessage" passing 50003 15 "Please enter a valid date"