SQL_SET_PROCEDURE_PARAMETER¶
Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex
With this command you can pass one or more parameters to predefined stored procedures on a MySQL or Oracle server. The SQL_SET_PROCEDURE_PARAMETER command enables you to add a parameter to a stored procedure which you are planning to call. You can pass multiple parameters by calling the command for each parameter.
When passing parameters you’ll have to inform the driver which variable you are passing, starting with 1 from left-to-right in the parameter list.
For each parameter you’ll have to indicate if the variable is to be regarded as input, output or both.
@Assumptions
Syntax
SQL_SET_PROCEDURE_PARAMETER {number} to {variable} {direction}
Parameter |
Description |
---|---|
number |
Index number of the parameter being defined. |
variable |
Variable holding the parameter to be passed. |
direction |
IN, OUT, IN_OUT, RSET, or leave blank |
Example
SQL_SET_PROCEDURE_NAME "sys.sp_addmessage" NUMPAR 3
SQL_SET_PROCEDURE_PARAMETER 1 to 500004 IN
SQL_SET_PROCEDURE_PARAMETER 2 to 15 IN
SQL_SET_PROCEDURE_PARAMETER 3 to "Please enter a valid Date" IN
SQL_PROCEDURE_EXECUTE