- General Rules
An SQLDA must be defined for the application.
The statement specified by statement_name must have been previously prepared successfully within the same transaction.
EXECUTE cannot be used with the dynamic form of any of the following:- Data returning statement
- Macro
- Multiple-statement request
For these cases, a dynamic cursor must be declared and the application program must access the results using an appropriate FETCH statement.
EXECUTE itself cannot be run as a dynamic SQL statement.
- USING Clause Rules
- The USING clause identifies variables used as input to the SQL statement specified by statement_name.
- The specified host variable name must be a valid client language variable declared before the EXECUTE statement that is used as an input variable. A client structure can be used to identify the input variables.
The number of variables specified must be the same as the number of parameter markers (the QUESTION MARK character) in the identified statement. The nth variable must correspond to the nth parameter marker.
- The descriptor name identifies an input SQLDA structure previously defined by the application. This SQLDA contains all necessary information about the input variable set.
The number of variables identified by the SQLD field of the SQLDA must be the same as the number of parameter markers (the QUESTION MARK character) in the identified statement. The nth variable described by the SQLDA must correspond to the nth parameter marker.