应该是你的文件在该目录下不存在 !检查一下!create or replace procedure p_testa is
file1 utl_file.file_type;
begin
file1:=utl_file.fopen('d:\','a.txt','r',30000);
utl_file.fclose(file1);
dbms_output.put_line('Exec right!');
end p_testa;SQL> exec p_testa;
Exec right!PL/SQL procedure successfully completed
file1 utl_file.file_type;
begin
file1:=utl_file.fopen('d:\','a.txt','r',30000);
utl_file.fclose(file1);
dbms_output.put_line('Exec right!');
end p_testa;SQL> exec p_testa;
Exec right!PL/SQL procedure successfully completed
v_fh:=utl_file.fopen('C:\Temp\',pFileName,'r');
加上就可以了!
真是糊涂