Previous Topic: -306 - STATEMENT TYPE CANNOT BE PREPAREDNext Topic: -308 - PREPARE HOST VARIABLE SOURCE STATEMENT LENGTH INVALID


-307 - STATEMENT-NAME statement_name CAN ONLY BE USED WITH ONE CURSOR

Explanation

The SQL DECLARE CURSOR statement references a statement_name that is referenced in another DECLARE CURSOR statement.

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

User Response

Modify or remove all but one of the DECLARE CURSOR statements for the statement displayed in the error message.