Subject Re: Exception hangling in stored procedure
Author tomkrej
Hi, the code loked like this

create procedure test_dostupnost (....)
returns (je_dostupny smallint)
begin

je_dostupny = -1;
execute procedure over_dostupnost_sklad(...);
execute procedure over_dostupnost_obchod(...);
...

je_dostupny = 1;
suspend;

when exception exc_nedost_sklad do
je_dostupny = -2;
when exception exc_nedost_obchod do
je_dostupny = -3;
...

end

As I found in some exemple code. And it did not work (it returns empty dataset)

But after Your message I tried to enclose this code into the begin .. end block and the suspend command after that block and, now it works.

begin
begin
execute ...
when ....
end

suspend;
end

Thank You for Your help.
Tom