Comment mettre à jour des enregistrements à l'aide du curseur OÙ le COURANT?

Je suis "ORA-01410: ROWID non Valide" exception lors de l'exécution de ce bloc. Des idées pourquoi?

DECLARE
  CURSOR c_orders IS
    SELECT * from orders FOR UPDATE OF no;
  v_order_record c_orders%ROWTYPE;
BEGIN
  OPEN c_orders; 
  LOOP
    FETCH c_orders INTO v_order_record;
    UPDATE orders SET no = 11 WHERE CURRENT OF c_orders;
    EXIT WHEN c_orders%NOTFOUND; 
  END LOOP;  
  CLOSE c_orders; 
END; 

Cependant, tout fonctionne si l'aide DE la syntaxe:

DECLARE
  CURSOR c_orders IS
    SELECT * from orders FOR UPDATE OF no;
BEGIN
  FOR rec IN c_orders
  LOOP
    UPDATE orders SET no = 11 WHERE CURRENT OF c_orders;
  END LOOP; 
END; 
InformationsquelleAutor Centurion | 2012-11-03