|
Re: how to insert gif image into table? [message #373815 is a reply to message #373808] |
Mon, 14 May 2001 09:44 |
Bala
Messages: 205 Registered: November 1999
|
Senior Member |
|
|
Hi,
This is an example i took it from
http://asktom.oracle.com
create table demo
( id int primary key,
theBlob blob
)
/
create or replace directory my_files as
'C:/oracle/admin/bintest/public_html';
declare
l_blob blob;
l_bfile bfile;
begin
insert into demo values ( 1, empty_blob() )
returning theBlob into l_blob;
l_bfile := bfilename( 'MY_FILES', 'pic1.gif' );
dbms_lob.fileopen( l_bfile );
dbms_lob.loadfromfile( l_blob, l_bfile,
dbms_lob.getlength( l_bfile ) );
dbms_lob.fileclose( l_bfile );
end;
/
commit;
Keep the file the specified directory and run the plsql block......
For retreiving, i don't have specific examples...
if you go to the above site and search for
BLOB you will get some examples...........
Bala.
|
|
|