|
SYNOPSIS
<TRACESQL on|off|N>
DESCRIPTION The TRACESQL directive sets an integer value that controls
the tracing of SQL calls made by a script. (Setting it to
"on" or "off" is the equivalent of 1 or 0,
respectively.) The lowest 4 bits are interpreted as a value from 0 to
15 that control SQL statement printing, with each value printing
everything at lower values too:
- 0: no tracing
- 1: prints a message for every SQL statement, containing the
full statement with its parameters
- 2: prints the entirety of parameters instead of just the first
few characters
- 3: parameters are single-quote-escaped for cut-and-paste to a
tsql command line for testing (not recommended for
production use) - 4: spaces/comments/newlines are not stripped
The remaining higher bits are taken as flags to control other SQL
tracing messages. Thus the following values can be bitwise ORed into
the value:
- 0x0010: SQL cache debug messages will be printed
- 0x0020: print the database during cache trace messages
- 0x0040: print Texis API calls
- 0x0080: print process ID as well
- 0x0100: do not replace non-ASCII characters with "
."
(period) in messages - 0x0200: print compiled SQL expression cache messages
- 0x0400: print compiled SQL expression at compile or open
- 0x0800: print compiled SQL expression before evaluation
- 0x1000: print compiled SQL expression after evaluation
- 0x2000: print SQL expression if non-compilable
As it is a directive, <TRACESQL> must appear before the first
function in the script. SQL tracing can also be enabled at run time
with the sqlcp function (here), which overrides
this directive, and on the command line with the -tracesql
option. Note that tracing functionality and values may change in
future releases, as this is a debugging directive.
EXAMPLE
<TRACESQL on>
<a name=main>
<if $del eq "y">
<sql "delete from books where id = $id"></sql>
<else>
<sql "update books set Text=$txt where id = $id"></sql>
</if>
</a>
CAVEATS The <TRACESQL> directive was added in version 3.0.947100000 20000105.
Setting <TRACESQL> to 2 or higher can produce large messages
for statements like the insertion of text fields.
SEE ALSO
sqlcp, -tracesql command line option
Copyright © Thunderstone Software Last updated: Mon Feb 18 10:28:15 EST 2013
|