? Trapping 'RAISE EXEPTION' in Informix stored procedures & Delphi 3 C/S
Posted in 1998
A strange one. From Delphi 3 C/S I am executing a stored procedure on
Informix Online. The stored procedure is coded to raise an error
(exception) by attempting to pass a alpha character into a integer value.
See the code below. Using either a TQuery or TStoredProc, the stored
procedure is executed. The first procedure (sp_test1), which does not
return any values runs fine and at run time generates an error, yet the
second procedure (sp_test2), which should return a value under normal
circumstances, fails to generate an error at runtime.
The strangest thing is that when the program is run from within the IDE a
break on exception will occur, but any 'try..except' is passed by.
Now, to me this means that the BDE is getting the error (The IDE does break
on the exception) yet it fails to carry it forth to the component
applicable.
Any suggestion, as this is quite a serious problem.
Any assistance is greatly appreciated.
Dennis Harding
------------------------------------------
create procedure sp_test1()
define l_int integer;
let l_int = 'A';
end procedure;
----------------------------------------
create procedure sp_test2()
returning integer;
define l_int integer;
let l_int = 'A';
return l_int;
end procedure;
----------------------------------------