In this blog post, let’s learn about the error message “363 CURSOR not on SELECT statement.” in Hydra and the description of the error.
Error Message
363 CURSOR not on SELECT statement.
Error Details
The cursor named in this statement (probably an OPEN) has been associated with a prepared statement that is not a SELECT statement. Review the program logic, especially the DECLARE for the cursor, the statement id specified in it, and the PREPARE that set up that statement. If you intended to use a cursor with an INSERT statement, you can only do that when the INSERT statement is written as part of the DECLARE statement. If you intended to execute an SQL statement, do that directly with the EXECUTE statement, not indirectly through a cursor.
This error is also returned when you attempt to associate a cursor with a SELECTINTO TEMP statement. Because of the INTO TEMP clause, the SELECT statement can return no rows and so cannot be used with a cursor.
Leave a Reply