|
Re: Regarding Storage Of Images Into Database [message #372110 is a reply to message #372094] |
Wed, 10 January 2001 09:47 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
Deanna
Messages: 9 Registered: December 2000
|
Junior Member |
|
|
Hi Srinivasulu
I havebeen trying to figure this one out too.
The following links may have info that is helpful
http://www.oracle.com/oramag/oracle/98-Jan/fast.html
http://www.oracle.com/oramag/webcolumns/ta010199_2.html
From what I can tell the code for inserting an image is:
set echo on
set serveroutput on
DECLARE
Image bfile;
BEGIN
DBMS_OUTPUT.PUT_LINE('Starting..');
insert into emp(empno,ename,sal,comm,hiredate,deptno,photo)
values(8002,'Kajol',1500,200,sysdate,10,bfilename('IMGDEMODIR','kajol.jpg'));
commit;
DBMS_OUTPUT.PUT_LINE('bfile inserted..');
select photo into Image
from emp
where empno=8002;
DBMS_OUTPUT.PUT_LINE('Size of the file inserted is ' || DBMS_LOB.GETLENGTH(Image));
END;
/
This was taken from one of the oracle links above.
Let me know if this worked or if you had to tweek the code.
Dee
|
|
|