我想在oracle中插入一个大数据。如下:
create table man(map blob);
create or replace directory FILEDIR as 'C:\'
declare
a_blob BLOB;
a_bfile BFILE:=BFILENAME('FILEDIR','lob.txt');
begin
insert into man(map) values (empty_blob()) returning map into a_blob;
dbms_lob.fileopen(a_bfile);
dbms_lob.loadfromfile(a_blob, a_bfile, dbms_lob.getlength(a_bfile));
dbms_lob.fileclose(a_bfile);
commit;
end;
其中在C盘下也存在lob.txt文件,我 是用的system登录的sql*plus .
但是这段代码为什么报错,系统找不到指定的文件
dbms_lob.fileopen(a_bfile); 这行出错
不能找不到呀。怎么回事呀。
create or replace directory FILEDIR as 'C:\'
应该改成
create or replace directory FILEDIR as 'C:\\';