Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: webserver: displaying images stored in database?
edwards@@garland.dnr.state.sc.us wrote:
>
> Has anybody been able to display images stored in a 'long'
> column through their browser using stored procedures?
Yes, those of us who aren't lazy and do take the time to try on our own before clogging up newsgroups have learned how to do this.
create or replace package body test2 is image_data long;
procedure home is
begin
htp.htmlopen;
htp.prn('<IMG SRC="'||
owa_util.get_owa_service_path||'test2.image">');
htp.htmlclose;
end home;
procedure image is
cursor image_cur is
select img from IMAGE_TABLE
where id = 1;
begin
open image_cur;
fetch image_cur into image_data; if image_cur%notfound then raise no_data_found; end if;
htp.prn(image_data);
exception
when no_data_found then
close image_cur;
when others then
NULL;
end image;
end test2; Received on Fri Nov 07 1997 - 00:00:00 CST
![]() |
![]() |