Re: Help UTL_FILE utility

From: Mark G <someone_at_hot>
Date: Wed, 7 Jul 1999 09:13:05 +0100
Message-ID: <378309a9.0_at_145.227.194.253>


At this point, i would usually say that you never need to put the trailing slash on your directory path

e.g

    utl_file.fopen('c:\temp','temp.txt','w');

however, because your file is on the root of your c: drive, i'm not sure if it should be there or not since i have never tried it! Try without and see.

Also, utl_file is a server side utility, if you want to manipulate client side files and you are using forms, you will need text_io.

HTH M

Kenneth C Stahl wrote in message <3782446F.489958F_at_Unforgettable.com>...
>Do you have utl_file_dir set in your initxxx.ora file? If so, what
>version of the rdbms are you using? There are some inconsistancies in
>versions earlier than 7.3.3 which requires that you specify the path
>with an ending '/'. With 7.3.4 and later that is not necessary.
>
>Ken
>
>Sarma Kambhampati wrote:
>
>> I'm getting 'INVALID PATH' error when running this code.
>> All I'm trying to do is Open a file in Write mode and
>> Close it!
>> Any suggestions?
>> Thanks
>> Sarma
>>
>> SET SERVEROUTPUT ON
>>
>> DECLARE
>> FILE_PTR UTL_FILE.FILE_TYPE;
>> BEGIN
>> FILE_PTR := UTL_FILE.FOPEN('c:\','temp.txt', 'w');
>> EXCEPTION
>> WHEN UTL_FILE.INVALID_PATH THEN
>> DBMS_OUTPUT.PUT_LINE ('INVALID PATH');
>> END;
>> /
>
Received on Wed Jul 07 1999 - 10:13:05 CEST

Original text of this message