Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: SQL execution problem (PL/SQL + HTP)
"Sybrand Bakker" <gooiditweg_at_sybrandb.verwijderdit.demon.nl> wrote in
message news:uttra0tifb80e05ckkv0jk4v904uifdhgt_at_4ax.com...
| On 19 May 2004 10:21:31 -0500, Galen Boyer <galenboyer_at_hotpop.com>
| wrote:
|
| >What is htp.print, and does this work in sqlplus?
|
| The htp package deals with html styled output
|
|
| You don't need it in sql*plus except for stored procedure output
| Set markup html will make sure all your output is in HTML format
|
|
| --
| Sybrand Bakker, Senior Oracle DBA
refer to the PL/SQL Web Toolkit and PL/SQL Gateway manuals -- the html output that sybrand refers to is specifically for web-based mod_plsql apps that use the PL/SQL Gateway (mod_plsql)
if you are developing web apps, the HTP package is somewhat analogous to the DBMS_OUTPUT package, in that it buffers output -- but the output is specifically intended to be retrieved by the mod_plsql interface and passed back to a browser.
the HTP package has some calls that generate the HTML tags for you (very limited value) , or you can include the HTML tags in strings that you pass to HTP.PRINT or HTP.P
if you are using the HTP package to develop procedures for web apps, you can do some testing of them in SQL*Plus by using the owa_util.showpage procedure after executing them -- OWA_UTIL.SHOWPAGE basically grabs the buffered HTP output and redirects it to DBMS_OUTPUT (although your first HTP call in SQL*Plus will fail:
ie:
*
ERROR at line 1:
ORA-06502: PL/SQL: numeric or value error ORA-06512: at "SYS.OWA_UTIL", line 323 ORA-06512: at "SYS.HTP", line 860 ORA-06512: at "SYS.HTP", line 975 ORA-06512: at "SYS.HTP", line 993 ORA-06512: at line 1
SQL> exec htp.bold('this htp call spits out this spring with HTML bold tags');
PL/SQL procedure successfully completed.
SQL> exec owa_util.showpage
<B>this htp call spits out this spring with HTML bold tags</B>
PL/SQL procedure successfully completed.
++ mcs Received on Fri May 21 2004 - 10:57:37 CDT
![]() |
![]() |