I'm kinda Old Skool so I don't use JAVA Stored Procedures (yet)
But must it be using Java? Maybe try this:
SVRMGR create or replace directory test_dir as 'E:\ORANT\BIN';
Statement processed.
SVRMGR drop table test_blob;
Statement processed.
SVRMGR create table test_blob
2 (dir_name varchar2(30)
3 ,file_name varchar2(255)
4 ,text blob
5 )
6 lob(text) store as test_blob_text
7 (chunk 4096 tablespace prot)
8 ;
Statement processed.
SVRMGR create or replace procedure load_file
2 (d varchar2 -- directory name
3 ,f varchar2 -- file name
4 ) as
5 l blob;
6 begin
7 insert into test_blob(dir_name,file_name,text)
8 values(d,f,empty_blob)
9 returning text into l;
10 dbms_lob.loadfromfile(l,bfilename(d,f),dbms_lob.getlength(bfilename(d,f)));
11 end;
12 /
Statement processed.
SVRMGR execute load_file('TEST_DIR','MIG80.EXE');
Statement processed.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only