- 论坛徽章:
- 0
|
关于informix的存储过程错误返回码的问题
drop procedure get_note1;
create procedure get_note1 (serial_id integer) returning varchar(40);
define l_note_text varchar(40);
define l_note_seq integer;
-- Note: this traps all errors, which suppresses the default error handling
-- Right now, I prefer the default error handling.
-- define esql, eisam integer;
-- ON EXCEPTION
-- set esql, eisam
-- let l_note_text = "Esql error: " || esql || ", Isam error: " || eisam;
-- return l_note_text;
-- END EXCEPTION
foreach
select note_text, note_seq
into l_note_text, l_note_seq
from va_note_text_h, va_note_text_d
where note_id = serial_id and fk_note_id = note_id
order by note_seq
return l_note_text with resume;
end foreach
end procedure; |
|