From: Matthew Smith <math@garden-shed.net>
>
>Am I going mad ???
Well, they say it takes one to know one, and boy, do I know you! :-)
>I'm running Informix SE/4GL 7.20.UD7 on SuSE Linux 2.2.10.
>
>When I do
>WHENEVER ERROR STOP
>LET l_stmt = "CREATE TRIGGER . .. . WITH syntax error in FOR EACH ROW"
>PREPARE stmt_prep FROM l_stmt
>the program falls over and a check of SQLCA.SQLCODE reveals -201, which
>is correct
>
>But when I do
>WHENEVER ERROR CALL my_error
>LET l_stmt = "CREATE TRIGGER . .. . WITH syntax error in FOR EACH ROW"
>PREPARE stmt_prep FROM l_stmt
>the program writes to the error file (correct) but SQLCA.SQLCODE = 0,
>and I can't catch the error and exit gracefully.
>
>I've tried preparing a simple SELECT with a syntax error and this puts
>-201 in SQLCA.SQLCODE for both WHENEVERs.
Do you do any screen IO or any other SQL in your error handler?
______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com