execute with where current of
Posted in 1998
on-line version 7.21ud1 4gl version 6.05.uc1 I have a problem with code similar to the following; LET l_sql = "SELECT * FROM tabname WHERE col1 = ? FOR UPDATE" PREPARE p_get_em FROM l_sql DECLARE select_cursor SCROLL CURSOR FOR p_get_em LET l_sql = "UPDATE tabname SET ( col1, col2, col3 ) = ( ?, ?, ? ) WHERE CURRENT OF select_cursor PREPARE p_update FROM l_sql ... BEGIN WORK OPEN select_cursor USING a_variable FETCH select_cursor INTO localrecord.* ... ... EXECUTE p_update USING localrecord.col1, localrecord.col2, localrecord.col3 The execute statement gives a "cursor not found" error All above statements have the necessary error checking after them, the fetch is working fine. I have tried all sorts to get around this. If I just execute the statement without preparing it then I get a "cursor not declared for update" error. I can get around this as the table has a unique key therefore removing the need to use the where current of, I just want to know why this does not work. Tony -- And the children dream of glory and Fortunes of War Safe in bed with stories of Fortunes of War, Fortunes of War "Fortunes Of War" - Fish 1997 Remove nospam to reply