hi, gurus:
i read the article of early time e and tried my self, hoping to insert a bin
file into a lob column of the database.but failed.
my env:
win2000 prof+oracle817.
SQL> desc lobtable
Name Null? Type
----------------------------------------- -------- ----------------------
NAME NOT NULL VARCHAR2(80)
LARGEOBJ BLOB
SQL> select name from lobtable;
NAME
---------------------------------------
test
test2
test3
and the largeobj of the third line is null.
first i created a directory:
SQL> create directory picture as 'h:\games';
Directory created.
then i wrote a stored program:
PROCEDURE LOAD_LOB is
obj blob;
fils bfile:=bfilename('picture','1.jpg');
amt integer:=4000000;
begin
select largeobj into obj from lobtable where name='test3';
dbms_lob.fileopen(fils,dbms_lob.file_readonly);
dbms_lob.loadfromfile(obj,fils,amt);
commit;
dbms_lob.fileclose(fils);
end;
and the 1.jpg does exist in the h:\game\1.jpg
and when i run the program, it said:
SQL> exec load_lob;
BEGIN load_lob; END;
*
ERROR at line 1:
ORA-22285: non-existent directory or file for FILEOPEN operation
ORA-06512: at "SYS.DBMS_LOB", line 475
ORA-06512: at "CHAOS.LOAD_LOB", line 7
ORA-06512: at line 1
i checked the dbms_lob package's reference,but can't find out what is wrong.
i even tried replace the picture dir with 'h:\games', but also failed.
can u give me some advice?
thanks alot.
�æ¬zÇ�¶¨}ø��©ND �±@Bm§ÿðÃ
+iöªr��ºØhÈZ¢�§��DO8nr¨¦K¶ëyÞ´V
+r5ëp¢¹z»âqë<çÎwó�9ÔPó�9ßÎtçT��8�����'è®x�>æå�Â'µêçzÖ�që,üÆ¢�)à.+-±:Ã�*.®Ç¥}úè�Øb²f¢�)à�+-±éÝjq
+j)fzË�ëh.+-êî}«\�Ü�¢ièµá $ì¥ée�x(|¸¬´k«¹©Ý�{azg¬±¨àØ�w%¹×��)Þr�íj)â�
+I@ND �º+¶§jg¨~f¢�)à�+-Ê�°j{m¡·«zj/y×ë¢f(ºf²j[(±éݶ�³Ü¢i��×è®�az¸§~�æjب�X¤zË�±Êân)à