Hello Informix World
I'd like to know if there is a way to get the message error string of an
exception, in a Stored Procedure as the function err_get() do in 4GL.
My Informix Product is INFORMIX-4GL Version 7.20.UE1X2
TIA,
_______________________________________________
Rodrigo Filipe
Dp. Sistemas de Informa''o (sv. Desenvolvimento)
SOPORCEL, S.A. - Figueira da Foz - Portugal
mailto:rfilipe@soporcel.pt
Internet : http://www.soporcel.pt
_______________________________________________
↪ replying to Rodrigo Filipe
> I'd like to know if there is a way to get the message error string of an
> exception, in a Stored Procedure as the function err_get() do in 4GL.
There is no function (as far as I know).
But...
Create a table (e.g. err_table (sqlcode integer,
sqltext varchar(80));
with unique index on sqlcode.
Write a little 4GL-program to fill this table
...
for loop = -4000 to -12000 step -1
let text = err_get(loop)
display loop,"|",text,"|" clipped
end for
...
Run this program (directing stdout to a file)
and load this file into your err_table.
Now you can select the errortext for each sqlcode
in your exception handler.
After writing this text I have a deja vu: isn't there
a solution in the IIUG archive ?
Hth,
Chris