Re: Onderwerp:7 vs 9
Posted in 2005
superboer wrote: > --- BEGIN WORK.... > > -- $DECLARE sel CURSOR WITH HOLD FOR SELECT f INTO :f FROM lvo; > ------------------------^^^^^^^^^^ > .... > -- $EXECUTE IMMEDIATE "ROLLBACK"; > > ----But the rollback here closes the cursor - it doesn't free it, but it > -- does close it. > > > does it?? the cursor is with hold?? ahum i should test this before i make > comments.......maybe i will.... > > anyways: > > i expect V7 to have the problem and V9 has it fixed??? > > i leave this upto the experts... Jonathan please comment.... I was out of town for a bit. I presume you've discussed this with IBM Informix Tech Support? If a WITH HOLD cursor is closed by COMMIT or ROLLBACK, that is an a priori bug - the whole point of a WITH HOLD cursor is that it stays open across transaction boundaries (and, IIRC, holds the locks it already held). I've not backtracked through the conversation (too lazy) to check what versions of what you're using - the dollar and colon symbols suggest ESQL/C - so I'm a little surprised. I've not noted such problems with any version of ESQL/C I've used (or of IDS that I've used), and things like DBD::Informix use hold cursors in MODE ANSI databases to behave faintly sanely, so I probably would have spotted a problem (not guaranteed - just probably). So, if you've not gotten this resolved by now, then (a) go to Tech Support, and/or (b) cite versions and platforms and show minimal example code (say 40 lines of ESQL/C) which illustrate that the cursor is closed by the rollback. $WHENEVER ERROR STOP; is an effective way of illustrating that an error occurs and cuts down on the coding you have to do. -- Jonathan Leffler #include <disclaimer.h> Email: jleffler@earthlink.net, jleffler@us.ibm.com Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/