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

Home -> Community -> Usenet -> c.d.o.misc -> Re: utl_file Package

Re: utl_file Package

From: <ibt123_at_my-dejanews.com>
Date: Wed, 12 Aug 1998 21:40:01 GMT
Message-ID: <6qt23i$n9k$1@nnrp1.dejanews.com>


In article <6qn8dm$oqv$1_at_phys-ma.sol.co.uk>,   "Bill Buchan" <bbuchan_at_ossian.net> wrote:
> I'd very much appreciate any help in getting the following code running
> using the utl_file package:
>
> DECLARE
> file_aaa utl_file.file_type;
> file_text varchar2(80);
> BEGIN
> file_aaa := utl_file.fopen('C:\Temp','ORACLE_testfile','w');
> file_text := 'Gibberish';
> utl_file.put_line(file_aaa,file_text);
> utl_file.fclose(file_aaa);
> END;
> /
>
> I have set the parameter
>
> utl_file_dir = C:\Temp
>
> in my init_.ora file and have bounced the database. I am running the code
> on the server-side but it merely returns exceptions - I am using Oracle8 on
> WinNT4.
>
> Any help would be much appreciated,
>
> Thanks,
>
> - Bill.
>
>

It may be as simple as adding the file extension to the file name, if your dealing with an existing file. Also, am not sure if 'w' will create a file. 'w' may require the file to exist. 'a' will create, if file doesn't exist, and append if it does. Other possibilities include: changing 'C:\Temp' to 'C: \Temp\' (this seems to vary between operation systems). If your in a secure environment (your own PC), try the catchall utl_file_dir = *, this will remove that as being a problem, to focus on other syntactical difficulties. Also, query AltaVista with UTL_FILE, there are some good manuals available online covering all of the possilbe exeptions that are specific to the UTL_FILE package. Knowing which exception is bogging you down (utl_file.invalid_path or otherwise) will simplify the process.

BGC -----== Posted via Deja News, The Leader in Internet Discussion ==----- http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum Received on Wed Aug 12 1998 - 16:40:01 CDT

Original text of this message

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