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 -> Re: BLOB's in Web page

Re: BLOB's in Web page

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Tue, 12 Mar 2002 20:40:31 +0000
Message-ID: <3C8E67BF.4E36@yahoo.com>


Jason Craig wrote:
>
> We're working to get a BLOB from our db into a web page via a stored
> pl/sql procedure. How do we accomplish this? Right now we're
> considering using a varchar2 as a pointer to the file. Here's a look
> at our code using a file only (not using the DB):
> procedure HOME
> is
> begin
> htp.htmlopen;
> htp.headopen;
> htp.title('wise home page');
>
> htp.p('<META HRRP-EQUIV="Expires" CONTENT="Mon, 12 Mar
> 2002 17:45:00 GMT">');
> htp.p('</META>');
> htp.headclose;
> htp.bodyopen;
> htp.header(1, 'EKBD');
> htp.header(1, 'Welcome to WISE. Where you will Screech
> if you do not get
> Hooters!');
> htp.tableOpen(cattributes => 'ALIGN ="center"');
> htp.tableRowOpen;
> htp.tableData(htf.img2('owl.jpg', cattributes =>
> 'height="259" width="259"'));
> /*'/u01/app/oracle/product/9.0.1/Apache/Apache/htdocs/owl.jpg'
> */
> htp.tableRowClose;
> htp.tableClose;
> htp.bodyclose;
> htp.htmlclose;
> end;
>
> We want to put the owl.jpg into the DB in a BLOB column, but how do we
> extract it? We're using 9i with all the develop software.
>
> Any help would be appreciated. Please e-mail me:
> jascraig_at_hotmail.com.
>
> Thanks,
> Jason

If its in the database you can stream it out using dbms_lob to read (say) 32k at a time, and end it down the line with htp.prn

hth
connor

-- 
==============================
Connor McDonald

http://www.oracledba.co.uk

"Some days you're the pigeon, some days you're the statue..."
Received on Tue Mar 12 2002 - 14:40:31 CST

Original text of this message

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