Re: Suppressing error messages
Posted in 1995
I would like to add one comment here. WHENEVER ERROR CONTINUE is very useful only providing you check the STATUS variable after EVERY SQL statement. And that includes such niceties as BEGIN WORK, COMMIT WORK, and ROLLBACK WORK. It should also be noted that whenever error cannot occur outside of a function, and therefore cannot be before the main statement. If the module includes a database statement then this must exist at the time MAIN is executed or you will get an error that cannot be trapped by the WHENEVER ERROR. > >I have chosen at one point to have in my code: > > > >whenever error continue > > > >However, informix insists on spitting the error out to the screen. My > >users are disconcerted when things whip past them that say "ERROR". > > > > Brian, > > Is this code in every module of the program? Whenever error is rather > strange. When you activate it at the top of a module it is active in > thatmodule until another whenever error is found. Whenever error also > onlyaffects the module it is in. You mus declaree it again in other > modulesfor it to be active there as well. This is the only thing I can > think ofthat would cause your problem. > > Yours > Wayne > > > |Wayne Harlech-Jones > |Windhoek, Namibia, Southern Africa > |wayne@jones.mac.alt.na > > Malcolm Weallans Online Database Consultancy Phone 0628-72154 Fax 0628-37463 CIX - onlinedbc