|
SYNOPSIS
<TRACESQL on|off|N>
DESCRIPTION The TRACESQL directive allows the tracing of SQL calls made
by a script. Setting it on (or a nonzero number) will print a message
for every SQL statement, containing the full statement with its
parameters. If it is set to 2 or higher, the entirety of parameters
is shown instead of just the first few characters; 3 or higher and
parameters are single-quote-escaped for cut-and-paste to a tsql
command line for testing (not recommended for production use); 4 or
higher and spaces/comments/newlines are not stripped. (Bit-wise ORing
the value with 16 causes certain SQL cache debug messages to be
printed as well; these are internal and subject to change without
notice. In version 3.01.983500000 20010301 and later, ORing with 32
causes the database to be printed too. In version
4.04.1073100000 20040102 and later, ORing with 64 causes API calls to be
printed.)
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 (p. ), which overrides
this directive, and on the command line with the -tracesql
option.
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 function, -tracesql command line option
Copyright © Thunderstone Software Last updated: Thu Mar 11 17:19:03 EST 2010
|