client_text_io.fclose - the file is not closing after it finsihes looping.
399902Feb 26 2004 — edited Feb 27 2004I am having the following problem with the following code.
I am calling a proc from a timer and the proc has the following code in it. The problem is that the reaidn of the file is failing when there are no more lines in the file to read it is not closing the file and moving on - instead after there are no more lines in the file to read the proc is just stopping and doing nothing - casuing the timer not to run again....
PLEASE HELP! what am doing wrong in the code - how do I force the file to close when there are no more records???
declare
f_file_read client_text_io.file_type;
begin
f_file_read := client_text_io.fopen(v_rename_file_dir_and_name,'R');
loop
client_text_io.get_line(f_file_read,v_file_return_line);
if v_file_return_line is not null then
v_count_docs_to_be_uploaded := v_count_docs_to_be_uploaded + 1;
end if;
end loop;
client_text_io.fclose(f_file_read);
end;