Re: ? Trapping 'RAISE EXEPTION' in Informix stored procedures & Delphi 3 C/S
Posted in 1998
Hi Dennis! I have the same problem with D3 C/S& Informix 6.0. And this problem is quite serious for me too. I found that in the first case when exception occures, SQLCA.SqlCode has correct error number. But when your SP returns value(s) this field is always ZERO. I believe that this is the problem source. I don't know either this is BDE problem or I-Connect problem. I'm too lazy to write ESQL/C program to check this. My workarounds are the following: my SP NEVER returns exceptions, I just catching them inside SP and after that I'm return error code as an additional result field. This is not the best way, but it works. -- Ivan Lyakhovenko, project manager, xTech Ltd. Novosibirsk, Russia. mailto:van@xTech.ru http://www.xTech.ru : 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