Re: 4GL Cursor for UPDATE
Posted in 2006
David Reed wrote: > I use 'INFORMIX-4GL Version 6.05.UD1' on 'SCO UNIX 5.x' > > I have the following code in a program, which looks OK according to a > 4GL manual (Programming Informix 4GL/SQL by Cathy Kipp). However, for > some reason I get the following error when I try to compile it. > > Can anyone see something wrong in the statement that I am missing, or > any other help? > > Regards > David Reed > > LET l_stmt = 'SELECT column1, column2 FROM table1' > PREPARE statment1 FROM l_stmt > DECLARE cursor1 CURSOR WITH HOLD > FOR statment1 FOR UPDATE OF column1 > | > | The symbol "update" does not represent a defined variable. > | See error number -4369. believe it or not the FOR UPDATE OF clause is part of the SELECT statement, thus you have to include it in the string you are PREPARing FROM. Also, I'm sure you are aware that 6.0x is prehistoric, not supported, etc -- Ciao, Marco ______________________________________________________________________________ Marco Greco /UK /IBM Standard disclaimers apply! Structured Query Scripting Language http://www.4glworks.com/sqsl.htm 4glworks http://www.4glworks.com Informix on Linux http://www.4glworks.com/ifmxlinux.htm