Polychronis :

>
you update the field that you qualify your rows (cerreur)
Is the message an error or warning one?
If warning then it is right
If error then I don't know  :-)
<

Error 2378 is an error message.

But I think I understand now my mistake :
As I change the value of cerreur to 99, original row is not anymore in the
DECLARE selection (because cerreur is not null anymore).

No more problem with :

DECLARE c2 CURSOR FOR SELECT numcde FROM T2commande WHERE cerreur IS NULL
OR cerreur = 99
OPEN c2

WHILE #PI <> 0 THEN
   FETCH c2 INTO vnumcde
   IF SQLCODE = 100 THEN
      BREAK
   ENDIF
   .........
   UPDATE T2commande SET cerreur = 99 WHERE CURRENT OF C2
   ........
   SET RULES ON
   UPDATE T2commande SET cerreur = NULL WHERE CURRENT OF C2
   ......
ENDWHILE

It is a supprise (for me) that UPDATE can change the selection .... but it
is a fact.

J.M. GRATIAS, Logimatique

Reply via email to