J.M.

The WHERE CURRENT OF cursor syntax has always been rather flaky. 
For that reason i NEVER use it.  I make sure all tables have a primary
key, prefereably an autonumber integer.  I always do my updates based
on that primary key.  This also has the benefit that the tables will
work with ODBC, if you ever need that functionallity.

Dennis






--- ELOEN <[EMAIL PROTECTED]> wrote:
> J.M
> 
> 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  :-)
> 
> Polychronis T. Kontos
> Athens, Greece
> 
> > -----Original Message-----
> > From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Behalf Of
> > J.M. GRATIAS
> > Sent: Wednesday, June 04, 2003 2:25 PM
> > To: RBASE-L Mailing List
> > Subject: [RBASE-L] - Issue with CURSOR in RBW6.5++
> >
> >
> >
> > Hi all,
> >
> >
> > Is there any rules that prevent from using severals UPDATE on the
> same row
> > in a DECLARE CURSOR/WHILE LOOP ?
> >
> > I am supprise that, in the following command file, the fisrt UPDATE
> works
> > correctly, but the second one return error 2378
> > 'Cursor is not positionned on a valid row'.
> >
> > Any idea ?
> >
> > Using W98SE and RBW 6.5++ build 1.851xRT03 ...
> >
> >
> > DECLARE c2 CURSOR FOR SELECT numcde FROM T2commande WHERE cerreur
> IS NULL
> > 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
> >
> > J.M. GRATIAS, Logimatique
> >
> 

Reply via email to