Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: pl*sql errors...
Arjan van Bentem wrote
>Furthermore, you should add some exception handling to your
>code, to find out what went wrong
... and to close the file you opened -- if you succeeded opening it. So, also add
if utl_file.is_open(..) then
utl_fclose(..);
end if;
or simply
fclose_all;
Note that (of course) fclose_all only closes the files opened by your session. Also note that the state of your file handles is not changed. That is: calling utl_file.is_open(..) might return true even though utl_file.fclose_all in fact has closed the file... So, flclose_all is only to be used in your final exception handler, when all other possibilities have failed.
Arjan. Received on Fri Mar 12 1999 - 12:19:36 CST