create directory ORALOAD AS 'C:\EMAILSETUP';
After creating an Oracle directory and running the same procedure below error is comming up.
SQL> exec MAIL_ATTACH('NTD.TXT')
BEGIN MAIL_ATTACH('NTD.TXT'); END;
*
ERROR at line 1:
ORA-29282: invalid file ID
ORA-06512: at "SYS.UTL_FILE", line 1095
ORA-06512: at "VEMS.MAIL_ATTACH", line 25
ORA-06512: at line 1
SQL>
Here is the actual code and variable declaration.
l_output Utl_File.File_Type;
rfile RAW(32767);
flen NUMBER;
utl_file.fgetattr('ORALOAD', fname, ex, flen, bsize);
vInHandle := utl_file.fopen('ORALOAD', fname, 'R');
utl_file.get_raw(l_output, rfile, flen); --- line 25
utl_file.fclose(vInHandle);
Please advise how to fix this issue.
Thanks in anticipation.
Tanveer