This statement (probably an EXECUTE or DECLARE) refers to a dynamic SQL statement that has never been prepared or that has been freed. Review the program logic to ensure that the statement has been prepared, the PREPARE did not return an error code, and the FREE statement has not been used to release the statement before this point.