Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> UTL_FIle fopen problem
I´m trying to open a file with utl_file but it
appears the excception "Invalid Operation". IT is
supposed because the operative system
permissions. I don´t know why because I´m a user
that has permissions in NT to read/write files.
I already put the line: UTL_FILE_DIR = * in the
INIT.ORA file. I don´t know what else I can do?
If you have any ideas I´ll appreciate. This is
part of the code I´ve.
DECLARE
p_FileDir varchar2(20); p_FileName varchar2(20); v_FileHandle UTL_FILE.FILE_TYPE; v_NewLine varchar2(24); v_VAC varchar2(3); v_Desc varchar2(23); v_Filler varchar2(1);
BEGIN
p_FileName := 'cmwvacd.dat'; p_FileDir := 'c:\temp'; v_FileHandle := UTL_FILE.FOPEN(p_filedir,p_fileName, 'r');
EXCEPTION
WHEN UTL_FILE.INVALID_OPERATION THEN
UTL_FILE.FCLOSE(v_FileHandle);
RAISE_APPLICATION_ERROR(-20051, 'Load
Accesory types: Invalid Operation');
when utl_file.invalid_filehandle then
utl_file.fclose(v_filehandle);
raise_application_error(-20052, 'load
accesory types: Invalid FileHandle');
when utl_file.read_error then
utl_file.fclose(v_filehandle);
raise_application_error(-20053, 'Read error');
WHEN OTHERS THEN
UTL_FILE.FCLOSE(v_FileHandle);
RAISE;
END;
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Tue Sep 19 2000 - 15:38:42 CDT
![]() |
![]() |