This DECLARE statement associates a cursor with the name of a prepared statement. However, another DECLARE statement has already been executed, and it associates a different cursor with the same statement id. This action is not supported; a given statement can be associated with only one cursor. Check all the DECLARE statements in the program, and check that they all refer to unique statements.
This error message should not appear for Version 5.0 and later.