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

Home -> Community -> Usenet -> c.d.o.server -> OWS: how to retrive image from db?

OWS: how to retrive image from db?

From: klimsamgin <klimsamgin_at_yahoo.com>
Date: Tue, 27 Apr 1999 10:41:40 GMT
Message-ID: <7g4493$ea0$1@nnrp1.dejanews.com>


Hi!

I've got a web interface to the database (OWS on Solaris 2.5, Oracle 7.3) and
I can see text strings from tables through a browser. But in some tables I store gif images in LONG RAW format. Is there a way to retrive pictures from database and see them in a browser? (A simple one is to store images on disk and call them through <img...> tag, but the images are already in database.)

When I build html page, I use <img src="..."> tag (htp.img) to call the picture, where src="/servicename/owa/imageretriver".

procedure imageretriver is

    cursor retriveimg is

            select img
            from image
	    where n=1;

    imagebuff image.img%type;

    begin

        open retriveimg;

        fetch retriveimg into imagebuff;

        close retriveimg;

        htp.prn(imagebuff);
    end;

end;

And it works, but in stead of image I've got it's hex code (you know, header GIF89 is 47494638396190...).

Thanks.

-----------== Posted via Deja News, The Discussion Network ==---------- http://www.dejanews.com/ Search, Read, Discuss, or Start Your Own Received on Tue Apr 27 1999 - 05:41:40 CDT

Original text of this message

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