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: trying to output to file via web using PL/SQL

Re: trying to output to file via web using PL/SQL

From: Jeff Grant <jeff_at_nettwerk.com>
Date: Wed, 2 Sep 1998 00:08:41 -0700
Message-ID: <Pine.GSO.3.96.980902000421.26497B-100000@budd>


Hi there-

You may want to try using an "unknown" mime type. In my experience, this will cause the "unknown file type... what do you want me to do with it, save it or open it" prompt to be displayed.

Maybe invent your own mime type with an extention of ".txt2save" or something.

The "text" or "html" mime types are known to the browser, and are therefore interpreted.

Now, I haven't tried this, but I think it might work.

$0.02

...jeff

On Tue, 1 Sep 1998, Eric Schlene wrote:

> I'm having a nightmare trying to get this to work. I've had some
> direction from this NG but with no sucess. so I apologize for hitting
> you all up again for help...but here goes.
>
> I need to send PL/SQL output via the Oracle Web Server to an end user's
> workstation. I'd like to use the browser to do this, triggering via
> PL/SQL the "save-as" dialog box on the browser. I've tried a half dozen
> different approaches, even trying to, as advised on the NG, trick the
> browser into thinking this is a specific file using a package/procedure
> name (e.g., fileit.txt).
>
> In any case, here's what I've got. I've left the three
> owa_util.mime_header calls in place with comments as to what results I
> get from each. My browser's application settings are set to interpret
> MIME text/Save-As as a write to disk call.
>
> Any help on this would be greatly appreciated.
>
> Eric Schlene
>
> ------------------------
>
> CREATE OR REPLACE PACKAGE BODY fileit AS
> PROCEDURE txt IS
> v_func VARCHAR2(10000);
> BEGIN
> owa_util.mime_header( 'text/save-as' ); -- gives document contains
> no data
> -- owa_util.mime_header( 'text/plain' ); -- lines as entered, +
> <BODY> and </BODY>
> -- owa_util.mime_header( 'text/html' ); -- html formatted text
> w/o <BODY>...
> htp.BodyOpen;
> v_func := '
> This is a test 01
> This is a test 02
> This is a test 03
> This is a test 04
> This is a test 05
> This is a test 06
> ';
> htp.Print(v_func);
> htp.BodyClose;
> END;
> END;
> /
>
>
>
>
>
Received on Wed Sep 02 1998 - 02:08:41 CDT

Original text of this message

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