Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Re: UTL_FILE problems
Hi Scott,
check your control-file: you have to use the correct pathname, be careful with Upper/Lowercase !
If your path is /apps/xacct/Reports and you type /apps/xacct/reports, FOPEN fails. If you use the path /apps/xacct/Reports in the control file and you use /apps/xacct/reports in the FOPEN-Command, it fails.
Hope this helps
Jens
On Thu, 15 Jun 2000 15:44:15 -0400, "Scott Buyer" <scottb_at_verio.net> wrote:
>I cannot get the fopen function of this package to run. I added the
>directory I am accessing to the control file, I create the variable of type
>UTL_FILE.FILE_TYPE;
>
>Here is my code in the proc
>
>CREATE OR REPLACE PROCEDURE XACCT.SUMMARIZE_USAGE_DETAIL_2_DED (V_STR_DATE
>CHAR)
>IS
> -- UTL file declaration
> d_exception_file1 UTL_FILE.FILE_TYPE;
> d_exception_file2 UTL_FILE.FILE_TYPE;
> d_directory1 varchar2(50) := '/apps/xacct/Reports/';
> d_directory2 varchar2(50) := '/apps/xacct/Reports/';
> v_test varchar2(50) := 'test1.txt';
> v_test2 varchar2(50) := 'test2.txt';
>BEGIN
> --CREATE DATE VARIABLE WHICH HAS TIME A SET TO 00:00:00
> begin
> d_exception_file1 :=
>UTL_FILE.FOPEN('/apps/xacct/Reports/','test1.txt','A');
> exception
> when others then
> dbms_output.put_line('1 errored out with ' || SQLERRM);
> end;
> begin
> d_exception_file2 := UTL_FILE.FOPEN(d_directory2,v_test2,'A');
>
>The open fails.
>
>Any thoughts out there.
>
>
>
Received on Thu Jul 13 2000 - 00:00:00 CDT
![]() |
![]() |