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

Home -> Community -> Usenet -> c.d.o.tools -> Re: UTL_FILE Problems. Can some one help?????

Re: UTL_FILE Problems. Can some one help?????

From: Jining Han <hanj_at_mailcity.com>
Date: Mon, 05 Feb 2001 17:48:21 GMT
Message-ID: <95mp11$5ih$1@nnrp1.deja.com>

In article <Zgyf6.1627$iM6.223924_at_newsread1.prod.itd.earthlink.net>,   "G" <gennt_at_hotmail.com> wrote:
> sing 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;
>
>

Stating the obvious: since you do

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

do you have

UTL_FILE_DIR = utl_file_directory

in your init.ora file?

--
Jining Han
Sallie Mae


Sent via Deja.com
http://www.deja.com/
Received on Mon Feb 05 2001 - 11:48:21 CST

Original text of this message

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