Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> Inserting BLOB from client system
Dear
i want to insert and retrieve blob from server using developer2000 and oracle8i, i have used the method given below to insert blob into the database. but it only works when the directory object is given path on server . suppose i give path as
create or replace directory my_files as '\\MACHINE1\DIR' , THEN IT DOES NOT WORK . Is it possible to do it or any other way out . The way which i figured out is to copy file using HOST command in developer 2000 in a server directory and then insert file into server using the procedure given below. But it is not practical ,
how can i insert the file just from client running developer2000 without copying to server? i dont want to copy file to server first and then insert into database.
Kindly help out
Regards,
create table demo
( id int primary key,
theBlob blob
)
/
create or replace directory my_files as
'c:\temp';
create or replace procedure load_a_file( p_file in varchar2 ) as
l_blob blob;
l_bfile bfile;
begin
insert into demo values ( 1, empty_blob() )
returning theBlob into l_blob;
l_bfile := bfilename( 'MY_FILES', p_file );
dbms_lob.fileopen( l_bfile );
dbms_lob.loadfromfile( l_blob, l_bfile,
dbms_lob.getlength( l_bfile ) );dbms_lob.fileclose( l_bfile ); Received on Wed Sep 13 2000 - 00:04:47 CDT
![]() |
![]() |