SQL_SET_FUNCTION_NAME¶
Applies to: ORAFlex SQLFlex MYSQLFlex PGFlex DB2Flex
This command is used in the same way as SQL_SET_PROCEDURE_NAME and SQL_SET_STMT to set the name of the function to be executed. When calling SQL functions in this fashion, this command must be used along with SQL_FUNCTION_EXECUTE (to execute the function), SQL_SET_FUNCTION_PARAMETER (to set the needed parameters) and SQL_GET_FUNCTION_RETURN (to get any returned value). The number of parameters must be set using the constant, NUMPAR, followed by the number of parameters. Note that when setting the name of the function, the user can be specified or, if left blank, the current user will be inserted before the function name.
Syntax
SQL_SET_FUNCTION_NAME {function} NUMPAR {parameters}
Parameter |
Description |
---|---|
function |
Full name of the function |
parameters |
Number of parameters to pass |
Example
SQL_SET_FUNCTION_NAME "getCustomerStatus" NUMPAR 1
SQL_SET_FUNCTION_PARAMETER 1 to 'Jones' IN
SQL_FUNCTION_EXECUTE
SQL_GET_FUNCTION_RETURN to dDOB
Showln dDOB
SQL_SET_FUNCTION_PARAMETER