Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> LOB : Problem with BFILENAME()
This question is about BFILE datatype.
I have following procedure: PROCEDURE test (name IN varchar2:= 'a.jpg' ) IS v_pix_source BFILE; BEGIN v_pix_source := BFILENAME('C_TEMP', name); IF DBMS_LOB.FILEEXISTS(v_pix_source) = 1 THEN DBMS_OUTPUT.PUT_LINE('EXIST'); ELSE DBMS_OUTPUT.PUT_LINE('NOT EXIST'); END IF; END test; C_TEMP IS A DIRECTORY object WITH PATH 'c:\temp\' . I keep getting 'NOT EXIST' when I call this procedure while the jpg file is in the directory c:\temp. I have tried 'c:\temp' toobut it didn't work either.
But this does work: INSERT INTO lob_table VALUES(1, bfilename('c:\temp\','a.jpg')); So it seems that the directory object is giving me trouble. This has nothing to do with privileges because I am using a DBA account to run the procedure. I can't use v_pix_source := BFILENAME('c:\temp\', name) in the procedure because it gives me an error. If someone can get this done, please show me a workingexample.
Any help will be appreciated!Received on Thu Aug 10 2000 - 00:00:00 CDT
![]() |
![]() |