Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> ora-302000 using tex_io
gurus,
i'm trying to read all the files in a directory (windows) using text_io, so i used the host command to issue a dir and dump the result into a file w/ number as a filename. however when i read the file the ff error occur
ora-302000 non-oracle exception.
i've search the oracle metalink and it said that this error occurs if filename exceeded the os max.# of characters for filename. but i haven't reached yet the max. w/ is 8 character for win98.
is there something wrong w/ the code?
thanks!
here's the code:
PROCEDURE get_po IS
cnt number;
in_file text_io.file_type;
linebuf varchar2(9999);
fname varchar2(9999);
empty boolean := false;
BEGIN
select tmp_po_no.nextval into cnt from dual;
fname := 'dir c:\argus_po\*.txt > c:\argus_po\'||cnt;
host(fname);
fname := 'c:\argus_po\'||cnt;
in_file := text_io.fopen(fname, 'r');
text_io.fclose(in_file);
exception
when others then
msg_alert('GET_PO:'||sqlerrm,'I',false);
if text_io.is_open(in_file) then
text_io.fclose(in_file);
end if;
end;
Grace Lim
Suy Sing Comm'l Corp.
Received on Sun Jan 07 2001 - 22:57:46 CST
![]() |
![]() |