SQL_GET_PROCEDURE_PARAMETER¶
Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex
This command is used to get the value of a specific parameter associated with a stored procedure. Although this command will work with any parameter, it is mostly be used with IN/OUT or OUT parameters as their value will more often be important once returned. When multiple values are returned, this command can be more efficient than other options. Note that the specified parameter must first be defined using the SQL_SET_PROCEDURE_PARAMETER command in order to work properly.
Syntax
SQL_GET_PROCEDURE_PARAMETER {parameter} to {variable}
Parameter |
Description |
---|---|
parameter |
Number of paramater to return |
variable |
Variable to hold the value of the parameter |
Example
SQL_SET_PROCEDURE_NAME "user.getCustomerStatus" NUMPAR 1
SQL_SET_PROCEDURE_PARAMETER 1 to sCustomerID IN_OUT
SQL_PROCEDURE_EXECUTE
SQL_GET_PROCEDURE_PARAMETER 1 to sStatus
Showln sStatus
SQL_SET_PROCEDURE_NAME "user.getCustomerStatus" NUMPAR 2
SQL_SET_PROCEDURE_PARAMETER 1 to sCustomerID IN
SQL_SET_PROCEDURE_PARAMETER 2 to sStatus OUT
SQL_PROCEDURE_EXECUTE
SQL_GET_PROCEDURE_PARAMETER 2 to sStatus
Showln sStatus