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: PL/SQL output to desktop file via OWA

Re: PL/SQL output to desktop file via OWA

From: Thomas Kyte <tkyte_at_us.oracle.com>
Date: Fri, 10 Jul 1998 00:28:35 GMT
Message-ID: <35a56002.2600499@192.86.155.100>


A copy of this was sent to Eric Schlene <eschlene_at_purdue.edu> (if that email address didn't require changing) On Thu, 09 Jul 1998 16:58:42 -0500, you wrote:

>Ok, I must be woefully inept. I've used the owa_util.mim_header command described,
>but without sucess. Do I need to preface the command with opening a header of some
>sort? If I use it like this
>---
> htp.htmlopen;
> htp.headopen;
> if ( disp_in = 1 ) then
> owa_util.mime_header( 'text/html' );
> else
> owa_util.mime_header( 'text/save-as' );
> end if;
>---
>in my stored procedure, I see "Content-type: text/save-as" at the top of my page.
>

owa_util.mime_header must be the FIRST output type statement in your procedure. Its part of the HTTP header record that will go back.

Move all of the htp.* calls AFTER the mime_header call.

>If I drop the htp.htmlopen command, I see no result from the mime_header utility.
>
>What am I missing?
>
>Eric
>
>
>
>
>
>
>Thomas Kyte wrote:
>
>> 2- or you need to simply put out a mime type in your routine....
>>
>> For example:
>>
>> create procedure do_the_report( p_in_html in varchar2 default 'Y' )
>> is
>> begin
>> if ( p_in_html = 'Y' ) then
>> owa_util.mime_header( 'text/html' );
>> else
>> owa_util.mime_header( 'text/save-as' );
>> end if;
>>
>> ......
>> end;
>
>
 

Thomas Kyte
tkyte_at_us.oracle.com
Oracle Government
Herndon VA  

http://govt.us.oracle.com/ -- downloadable utilities  



Opinions are mine and do not necessarily reflect those of Oracle Corporation  

Anti-Anti Spam Msg: if you want an answer emailed to you, you have to make it easy to get email to you. Any bounced email will be treated the same way i treat SPAM-- I delete it. Received on Thu Jul 09 1998 - 19:28:35 CDT

Original text of this message

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