The FREE statement released the resources that are attached to the cursor named in this statement, or possibly an automatic re-prepare was attempted while opening the cursor and it failed, leaving the cursor unavailable. Before you can use the cursor, you must again prepare the SQL statement that is associated with it. If the cursor was declared FOR a statement, re-execute its DECLARE statement. If the cursor was declared FOR a statement identifier, execute the PREPARE statement again.