Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: pl*sql errors...

Re: pl*sql errors...

From: Arjan van Bentem <avbentem_at_DONT-YOU-DAREdds.nl>
Date: Fri, 12 Mar 1999 19:19:36 +0100
Message-ID: <36e95be9$0$2608@newton>


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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US