Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: webserver: displaying images stored in database?

Re: webserver: displaying images stored in database?

From: <edwards_at_>
Date: 1997/11/07
Message-ID: <63v4v5$dar@news1.infoave.net>#1/1

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;

    close image_cur;

    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

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US