Re: Whenever error continue scope
Posted in 1993
Cathy Kipp writes: >Netters, > >We are having problems with the scope of the "whenever error continue" >statement. In long programs, it seems at points to "forget" that the last >"whenever error" statement was a "continue" statement. If we put in the >"whenever error continue" statement right in front of where the sql error is >occurring, this stops the program from deciding to bomb out. But we do not >want to go through ALL of our code and put a "whenever error continue" >statement at the beginning of each function. > >Is there perhaps a problem if,within a module, a function in an external >module is called? Informix Tech Support seems to be fairly clueless so far. >Has anyone else had any similar experiences? Any workarounds? WHENEVER ERROR is really a compile time instruction, since it causes additioanl code to be inserted after each sql statement to do what you specify (or in the case of continue, to not put anything in). If you have modules containing no direction that are called from those with direction, the direction is essentially lost (since the required c code was never inserted for these other modules). It is probably best to have an appropriate whenever error in every function that contains embedded sql. Dave -- Disclaimer: These opinions are not those of Informix Software, Inc. ************************************************************************** "I look back with some satisfaction on what an idiot I was when I was 25, but when I do that, I'm assuming I'm no longer an idiot." - Andy Rooney