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: UTL_FILE problems. Need some help????

Re: UTL_FILE problems. Need some help????

From: Maxim <mdemenko_at_t-online.de>
Date: Tue, 6 Feb 2001 01:33:32 +0100
Message-ID: <95ngou$h6k$04$1@news.t-online.com>

i have read in metalink a workaround about this bug ( it happens only if you call utl_file.fopen with 4th parameter- for buffersize, if you call before utl_file.fopen with 3 parameter then it work correctly),i.e. v_file_handle := utl_file.fopen('utl_file_directory','Test.txt','w'); utl_file.fclose(v_file_handle );
v_file_handle := utl_file.fopen('utl_file_directory','Test.txt','w',10240); HTH
Maxim Demenko
"G" <gennt_at_hotmail.com> schrieb im Newsbeitrag news:Mhyf6.1631$iM6.224108_at_newsread1.prod.itd.earthlink.net...
> Using the following snippet against a 5.1.5.1.1 installation, I am
 receiving
> a 'ORA-01403: no data found' error. I have included the workaround that
 used
> to work for this, which is to open the file, close it, and reopen it again
> before writeing to the file. This does not work. There are no issues with
> 8.0.5 or 8.1.6.
> Is there another workaround?
>
> The output for this snippet is:
>
> Inserting line
> Error
> ORA-01403: no data found
>
> SET SERVEROUTPUT ON
> DECLARE
> v_file_handle UTL_FILE.FILE_TYPE;
>
> BEGIN
> v_file_handle :=

 UTL_FILE.FOPEN('utl_file_directory','Test.txt','w',10240);
> UTL_FILE.FCLOSE(v_file_handle);
> v_file_handle :=

 UTL_FILE.FOPEN('utl_file_directory','Test.txt','w',10240);
>
> DBMS_OUTPUT.PUT_LINE('Inserting line');
> UTL_FILE.PUT_LINE(v_file_handle,'Test line');
> DBMS_OUTPUT.PUT_LINE('Line Inserted');
>
> UTL_FILE.FCLOSE(v_file_handle);
>
> EXCEPTION
> WHEN OTHERS THEN
> UTL_FILE.FCLOSE(v_file_handle);
> DBMS_OUTPUT.PUT_LINE('Error');
> DBMS_OUTPUT.PUT_LINE(SQLERRM);
> END;
>
>
>
>
>
Received on Mon Feb 05 2001 - 18:33:32 CST

Original text of this message

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