INFORMIX
Informix-ESQL/C Programmer's Manual
Chapter 17: Using an sqlda Structure
Home Contents Index Master Index New Book

Handling a Parameterized User-Defined Routine

For an introduction on how to determine input parameters, see page 15-26. This section describes how to handle a parameterized user-defined routine with an sqlda structure. The following statements execute user-defined routines:

If a prepared EXECUTE PROCEDURE or EXECUTE FUNCTION statement has arguments specified as input parameters of unknown number and data type, your ESQL/C program can use an sqlda structure to define the input parameters.

Executing a Parameterized Function

You handle the input parameters of a user-defined function in the same way that you handle input parameters in the WHERE clause of a SELECT statement, as follows:

The only difference between the execution of these EXECUTE FUNCTION and SELECT statements is that you prepare the EXECUTE FUNCTION statement for the noncursor function, instead of the SELECT statement.

Executing a Parameterized Procedure

To execute a parameterized user-defined procedure, you can use the EXECUTE...USING DESCRIPTOR statement to provide the argument values from an sqlda structure and to execute the procedure. You handle the input parameters of a user-defined procedure in the same way that you handle input parameters in a noncursor function. The only difference between the execution of the EXECUTE PROCEDURE statement and the EXECUTE FUNCTION statement (for a noncursor function) is that you do not need to specify the INTO clause of the EXECUTE...USING DESCRIPTOR statement for the user-defined procedure. For more information, see "Executing a Parameterized Function".




Informix-ESQL/C Programmer's Manual, version 9.1
Copyright © 1998, Informix Software, Inc. All rights reserved.