Re: the -globcurs flag and prepared updates
Posted in 1999
If you had provided an example of the cursor where it was failing, it would be helpful, but anyways, make sure that the prepared statment for the Update cursor is defined as follows: let sql_stmt = "update table_name ", "set (", "coumn1, ", "column2, ", "column3) = (?,?,?) ", "where current of ", cursor_name("previously_defined_curs") prepare upd_table from sql_stmt This works fine. Gopi. -----Original Message----- From: DSL <dsl@one.net> To: informix-list@iiug.org <informix-list@iiug.org> Date: Tuesday, May 18, 1999 2:49 PM Subject: the -globcurs flag and prepared updates >We just upgraded from 4gl version 4.12.UE1 to 7.20.UD3. Our 4ge's were >acting very erratically, and we determined that we had a large number of >programs which had identically-named cursors in different functions. I >realize that this has always been bad coding practice, but the older >versions of Informix apparently weren't to anal about it. To make our lives >easier, we removed the '-globcurs' flag from c4gl in the bld_make script, >and recompiled and installed all the 4ge's (> 100). Now we are finding a >large number of SQL error -507's, 'cursor not found'. This is occurring when >a cursor is declared for update, then the update itself is prepared, with >'where current of cursor_name'. When the prepared update is executed, it is >now failing. Is there a solution that will solve both of these problems >(duplicate cursor names and prepared updates), or are we 'damned if we do >and damned if we dont'? > >thx in advance >dsl > >