The cursor that this statement uses has not been properly declared or prepared, or the FREE statement has released it, or an automatic re-prepare has been attempted while opening the cursor but that operation failed, leaving the cursor unavailable. Review the program logic to ensure that the cursor has been declared. If it has, and if the DECLARE statement refers to a statement identifier, check that the referenced statement has been prepared.