Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with bfilename(directory_name,file_name) function

653449Apr 17 2009 — edited Apr 20 2009
Hi all,

I have a problem with this function. I have built and pl/sql program in order to send an email wich includes "pdf" file.

I have found that bfilename function works fine when you want to send a pdf file.

However, when I execute this query

SELECT bfilename('/usr/tmp', 'pdf_report.pdf') dato
FROM dual;

The result shows in the screen : /usr/tmp//pdf_report.pdf (NoExist)

I don't know why the path includes double "//".

Then, I wanted to open the file in this way

bfile_len := dbms_lob.getlength(bfile_handle);
pos := 1;
dbms_lob.open(bfile_handle,dbms_lob.lob_readonly);

an error occurs :

ORA-22285: non-existent directory or file for GETLENGTH operation.

I infere that the problem is "//" but I don't know why it happened.

Can I use another function in order to send a pdf file inside an email ? Or can I change a blob type column in order to replace "/" insted of "//" ?.

I appreciate your help.

Best Regards,
Mariano.-
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 18 2009
Added on Apr 17 2009
3 comments
1,384 views