Merging Html and output from a SQL Querry On WebServer 2.1

Merging Html and output from a SQL Querry On WebServer 2.1

Post by Massimo Tren » Thu, 09 Oct 1997 04:00:00



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.

 - Writing my own WRB cartridge to load the page, modify it and
   then printing the page+result merged alltogether.

Has anyone managed to do such a thing ?

Solutions are welcome

The running platform is Windows NT4 Server + Oracle WebServer 2.1

Thanx in advance.

p.s. : Please reply also by mail , because i do not check the
newsgroups on a daily basis.

Massimo Trento

 
 
 

Merging Html and output from a SQL Querry On WebServer 2.1

Post by Ronan Mile » Thu, 09 Oct 1997 04:00:00



> 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.

Quote:

>  - 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

 
 
 

Merging Html and output from a SQL Querry On WebServer 2.1

Post by Thomas Ky » Fri, 10 Oct 1997 04:00:00


You can take a look at the owa replacement cartridge (freeware, source code and
binary, use at own risk sort of deal) on http://govt.us.oracle.com/ under
downloadable utilities.  It'll let you embed PL/SQL in html, for example:

<html>
<head>
<title>Hello</hello>
</head>
<body>

this is some text, lots of stuff here <img src=foo.gif>
...
...

<oracle>
begin
    some_procedure( :n );
end;
</oracle>

here is more text....

<table>
<tr><th>Ename</th><th>Job</th></tr>
<oracle>
begin
   owa_util.cellsprint( 'select ename, job from emp where ename like :ename' );
end;
</oracle>
</table>

here is yet more...

<oracle>
declare
   l_str   varchar2(25);
begin
   select to_char( sysdate, 'dd-mon-yyyy hh24:mi:ss' ) into l_str from dual;
   htp.bold( 'The time is ' || l_str );
end;
</oracle>


>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.

> - Writing my own WRB cartridge to load the page, modify it and
>   then printing the page+result merged alltogether.

>Has anyone managed to do such a thing ?

>Solutions are welcome

>The running platform is Windows NT4 Server + Oracle WebServer 2.1

>Thanx in advance.

>p.s. : Please reply also by mail , because i do not check the
>newsgroups on a daily basis.

>Massimo Trento


Thomas Kyte

Oracle Government
Bethesda MD

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

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

 
 
 

1. Live HTML webserver 2.1

Hi,

My live html file is not including the files with the #include when I put it in
 any directory other than $ORACLE_HOME/ows2/sample/ssi where oracle supplies
 the live html sample. I use exactly the same html in both directories, so I
 know there is nothibg wrong with the html. I have also set a virtual directory
 map for the directory I am putting this in, but it still doe'nt work. Any idea
 on what I am missing?

Thanks,
Abhijit B

2. Using SQL Server 1.1, EVC++, ADOCE 3.1 and having problems

3. Betreff: Oracle Webserver 2.1 data resive from HTML with POST-method

4. NG Printing

5. WebServer 2.1, PL/SQL and TCP/IP

6. Reservation tracking

7. output redirection in Informix 2.1 SQL

8. help with drop tablespace

9. Problems with Oracle8 and WebServer 2.1

10. SSI in Oracle Webserver 2.1

11. Please Help! Oracle Webserver 2.1 DCD problem

12. Running perl with Oracle Webserver 2.1 for NT

13. Oracle WebServer 2.1 + Netscape Enterprise?