Vincent Legendre wrote:
> I can't delete record in a cursor.
>
> Example :
> DECLARE cur_del CURSOR FOR
> SELECT * FROM dilcf
> WHERE ncdf = wecf.ncdf
> AND cdos = wcdos
> AND cdpo = w_anc_cdpo
> FOR UPDATE
> OPEN cur_del
> FETCH cur_del INTO wlcf.*
> WHILE SQLCA.SQLCODE = 0
> DELETE FROM dilcf WHERE CURRENT OF cur_del
> FETCH cur_del INTO wlcf.*
> END WHILE
> CLOSE cur_del>
> Results on instruction " DELETE FROM dilcf WHERE CURRENT OF cur_del "
> => error -507 : cursor "cur_del" not found
>
> What could be the reasons?
>
> Notes : Table declaration "dilcf" is a view on a remote host
> Dynamic server version 7.30
The language looks like I4GL. What version are you using, and which
version were you using previously. Try recompiling with the option
-globcurs -- it will probably fix the problem.
If I'm right, this is a manifestation of the infamous bug B31661,
and has nothing to do with the view at all, but to do with cursor
name mangling. Have fun :-( And look up the CURSOR_NAME() function.
Or upgrade to 7.30 I4GL as soon as it is available (end of July 99?).
It has laid this problem to rest, as far as I can tell.
--
Jonathan Leffler (jleffler@informix.com, jleffler@earthlink.net)
Guardian of DBD::Informix v0.60 -- see http://www.perl.com/CPAN
#include <disclaimer.h>