Re: Merging Html and output from a SQL Querry On WebServer 2.1

From: Ronan Miles <milesr_at_entcf2.agw.bt.co.uk>
Date: 1997/10/08
Message-ID: <343B6180.73B0_at_entcf2.agw.bt.co.uk>#1/1


Massimo Trento wrote:
>
> Hello.
>
> I have a client that needs to include in his own designed html pages,
> the output of a PL/SQL function.(This is a result from a submitted
> form)
>
> For this , i need to load the Html page , execute the querry , insert
> the result in the loaded page and the print the page.
> But the problem is that i did not find any way to load the html from
> the disk (not the database).
>
> The possible solutions i found are :
> - Using Live Html, using the commands : <--#config cmdecho='ON'>
> <--#exec MySqlFunction >
>
> and hoping that the result will be merged with the current page
> (according to the Oracle Tech. support, it is not possible.

It does work because we have done it. The problem is that you can't pass dynamic parameters into the PL/SQL function so it tends to be of little use.i.e. you have your template HTML which wants to get database info in context but you cant do this becuase there is no way (we tried for weeks) to get a parameter into the exec'd function.
>
> - Writing my own WRB cartridge to load the page, modify it and
> then printing the page+result merged alltogether.

We built a PL/SQL one. It uses UTL_FILE to read the template file in and looks for tags similar to the ones used in live html (--#exec). It then uses dynamic SQL method to call the defined function and we have a coding protocol to define the context. This works and the performance is fine for our needs. Note: for a variety of reasons we decided to 'publish' the html template into the database which gets rid of UTL_FILE. For real performance, we could impliment as a wholly new cartridge.

-- 
_____________________________________________________________

Opinions expressed are my own and do not reflect my employers
Received on Wed Oct 08 1997 - 00:00:00 CEST

Original text of this message