Thunderstone Software Document Retreival and Management
Search:
Advanced Search
Home | Products | Company | News | Tech Support | Demos | Contact Us
Vortex Manual

TRACESQL - trace SQL calls

 

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.  gif ), 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: Wed Sep 10 11:16:28 EDT 2008
 
Home   ::   Products   ::   Company   ::   News   ::   Tech Support   ::   Demos   ::   Contact Us
Copyright © 2008 Thunderstone Software LLC. All rights reserved.