Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Writing blobs into Oracle 8i from a Java Stored Procedur
Message
From
12/07/2001 05:43:58
 
 
To
12/07/2001 05:07:15
Tim O'Leary
Pricewaterhousecoopers
Melbourne, Australia
General information
Forum:
Oracle
Category:
Troubleshooting
Miscellaneous
Thread ID:
00529587
Message ID:
00529590
Views:
7
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
Map
View

Click here to load this message in the networking platform