Previous Topic: -308 - PREPARE HOST VARIABLE SOURCE STATEMENT LENGTH INVALIDNext Topic: -310 - COMBINATION OF CHECKPLAN=checkplan_value, CHECKWHO=checkwho_value, AND CHECKWHEN=checkwhen_value IS INVALID


-309 - HOST VARIABLES CANNOT BE USED IN DYNAMICALLY PREPARED STATEMENTS

Explanation

The dynamic SQL statement contains host variables. Host variables cannot be used in dynamic SQL statements. Parameter markers (question marks) must be used in the place of host variables.

The SQLSTATE that equates to this SQL return code is 07S09.

User Response

Modify the dynamic SQL statement to use parameter markers or convert the statement to static SQL.