Restrictions

The number of prepared objects in a single program is limited by available memory. These include statement identifiers declared in PREPARE statements (statement_id or statement_id_var) and declared cursors. To avoid exceeding the limit, use the FREE statement to release some statements or cursors.

In SPL routines, a prepared object can include the text of no more than one SQL statement, and that statement must be either an EXECUTE FUNCTION, EXECUTE PROCEDURE, or SELECT statement, but the SELECT statement cannot include the INTO variable, INTO TEMP, or FOR UPDATE clause.

An expression that specifies the statement text in an SPL routine must evaluate to a CHAR, LVARCHAR, NCHAR, NVARCHAR, or VARCHAR data type. You must explicitly cast to one of these types an expression of any other text data type, such as a UDT.

For restrictions in ESQL/C routines on the SQL statements in the character string, see Restricted Statements in Single-Statement Prepares and Restricted Statements in Multistatement Prepared Objects.