Re: UTL_FILE fopen exception

From: Adam Hapworth <hap_at_mikomi.org>
Date: 8 Jan 2002 04:16:06 -0800
Message-ID: <a6cb04db.0201080416.3ee2992e_at_posting.google.com>


john_killeen_at_hotmail.com (Killeen) wrote in message news:<e05ea253.0201071038.577c22b6_at_posting.google.com>...
> Hi
>
> I am trying to use UTL_FILE to read data from a file and load a number
> of tables. I get a User Defined Exception when I run the FOPEN
> function. The utl_file_dir parameter is set to *. Is there anything
> else I need to set in order to use the UTL_FILE package.
>
> Thanks
> John

Make sure you have the variable type set right:

   in__file utl_file.file_type;

and make sure if you are using variables in the FOPEN that you concat quotes around them:
 in_file := utl_file.fopen(''||directory||'',''||file_name||'', 'r');

those are the two things that I would check first seeing as you say you have the utl_file_dir set in your init.ora.

Adam Received on Tue Jan 08 2002 - 13:16:06 CET

Original text of this message