OWS: how to retrive image from db?
Date: Tue, 27 Apr 1999 10:05:23 GMT
Message-ID: <7g4252$cpt$1_at_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 - 12:05:23 CEST