IBM Books

Reference


SQL

This language construct is equivalent to a function called with FUNCTION(DTW_SQL) in Net.Data.

It can contain SQL_REPORT and SQL_MESSAGE statements, which are also from DB2 WWW Connection. DB2 WWW Connection does not support named %SQL blocks.

Examples:

Example 1: A DB2 WWW Connection macro

%SQL{
UPDATE $(dbtbl) SET URL='$(URL)' WHERE ID=$(ID)
%SQL_MESSAGE{
100: "<B>The selected URL no longer exists in the table</B>." : continue
%}
%}
 
%HTML_INPUT{
<HTML>
...
%EXEC_SQL
</HTML>
%}
 
%HTML_REPORT{
<HTML>
...
</HTML>
%}

Example 1: An equivalent Net.Data macro

%FUNCTION(DTW_SQL) URLquery(){
UPDATE $(dbtbl) SET URL='$(URL)' WHERE ID=$(ID)
%MESSAGE{
100: "<B>The selected URL no longer exists in the table</B>." : continue
%}
%}
 
%HTML(INPUT){
<HTML>
...
@URLquery
</HTML>
%}
 
%HTML(REPORT){
<HTML>
...
</HTML>
%}


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]