示例代码
Declare
--create directory zllob as 'G:\Pic\QQ_pic';
l_Blob Blob;
Dest_Offset Number;
Src_Offset Number;
v_Bfile Bfile;
Begin
Insert Into 临床路径图标 (ID, 图标, 性质) Values (104, Empty_Blob(), 1);
Select 图标 Into l_Blob From 临床路径图标 Where ID = 104 For Update;
v_Bfile := Bfilename('ZLLOB', '爬虫.gif');
Dest_Offset := 1;
Src_Offset := 1;
Dbms_Lob.Open(v_Bfile, Dbms_Lob.Lob_Readonly);
Dbms_Lob.Loadblobfromfile(l_Blob, v_Bfile, Dbms_Lob.Lobmaxsize, Dest_Offset, Src_Offset);
Dbms_Lob.Close(v_Bfile);
Commit;
End;
/
Declare
--create directory zllob as 'G:\Pic\QQ_pic';
l_Blob Blob;
Dest_Offset Number;
Src_Offset Number;
v_Bfile Bfile;
Begin
Insert Into 临床路径图标 (ID, 图标, 性质) Values (104, Empty_Blob(), 1);
Select 图标 Into l_Blob From 临床路径图标 Where ID = 104 For Update;
v_Bfile := Bfilename('ZLLOB', '爬虫.gif');
Dest_Offset := 1;
Src_Offset := 1;
Dbms_Lob.Open(v_Bfile, Dbms_Lob.Lob_Readonly);
Dbms_Lob.Loadblobfromfile(l_Blob, v_Bfile, Dbms_Lob.Lobmaxsize, Dest_Offset, Src_Offset);
Dbms_Lob.Close(v_Bfile);
Commit;
End;
/
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/117319/viewspace-1839908/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/117319/viewspace-1839908/