Alternatives to PREPARE ... EXECUTE FUNCTION ... INTO
About this task
In ESQL/C, you cannot prepare an EXECUTE FUNCTION statement
that includes the INTO clause. For similar functionality, however,
follow these steps:
- Prepare the EXECUTE FUNCTION statement with no INTO clause.
- Declare a Function cursor for the prepared statement.
- Open the cursor.
- Execute the FETCH statement with an INTO clause to fetch the returned values into program variables.
Alternatively, you can do the following:
- Declare a cursor for the EXECUTE FUNCTION statement without first preparing the statement, and include the INTO clause in the EXECUTE FUNCTION when you declare the cursor.
- Open the cursor.
- Fetch the returned values from the cursor without using the INTO clause of the FETCH statement.