|
为什么这么多的PLSQL代码,都没有定义exception,没有rollback?
要么连exception都没写。
例:
create or replace procedure hek_test_p(Errbuf out varchar2,retcode out number) as
t_ex exception;
begin
insert into hek_test values(6790);
apps.Fnd_File.Put_line (apps.FND_FILE.OUTPUT, '提交1');
commit;
end hek_test_p;
要么就没有rollback。
例:
create or replace procedure hek_test_p(Errbuf out varchar2,retcode out number) as
t_ex exception;
begin
insert into hek_test values(6790);
apps.Fnd_File.Put_line (apps.FND_FILE.OUTPUT, '提交1');
commit;
exception
when others then
apps.Fnd_File.Put_line (apps.FND_FILE.OUTPUT, '出错');
end hek_test_p;
只有我有这个疑问吗?还是PL/SQL程序员的惯性思维?还是在ORACLE中事务、异常根本就不重要?
[ 本帖最后由 jarwang 于 2009-6-15 09:28 编辑 ] |
|