AIX | HP-UX | Linux | OS/2 | OS/390 | OS/400 | PTX | SUN | Win NT |
X | X | X | X | X | X | X | X | X |
Purpose
Hides or displays the SQL of the query used on the Web browser. Displaying the SQL during testing is especially helpful when you are debugging your Net.Data macros. SHOWSQL can only be used if DTW_SHOWSQL is set to YES in the Net.Data configuration file. For more information about the DTW_SHOWSQL configuration variable, see the configuration chapter in Net.Data Administration and Programming Guide for your operating system.
Specify the value of this variable using a DEFINE statement or with the @DTW_ASSIGN() function.
Values
SHOWSQL="YES"|"NO"
Values | Description |
---|---|
YES | Displays the SQL of the query sent to the database. |
NO | Hides the SQL of the query sent to the database. NO is the default. |
Restriction: SHOWSQL generates HTML or XML markup. When used within other presentation statements, such as JavaScript, syntax errors can occur.
Examples
Example 1: Displays all SQL queries
In the configuration file:
DTW_SHOWSQL YES
In the macro:
%DEFINE SHOWSQL="YES"
Example 2: Specifying whether to display SQL using HTML form input.
In the configuration file:
DTW_SHOWSQL YES
In the macro:
SHOWSQL: <input type="radio" name="showsql" value="yes" /> Yes <input type="radio" name="showsql" value="" checked /> No