This seems to work for me:
<cfif isDefined("error.rootCause.SQL")>
SQL: #error.rootCause.SQL#<br>
<cfelseif structKeyExists(error.rootCause.tagContext[1],"SQL")>
SQL: #error.rootCause.tagContext[1].SQL#<br>
</cfif >
You may not need to use the whole thing. The template has been made to run
on a few different versions of CF since 4.5 :)
Joel
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
Behalf Of Scott Thornton
Sent: Thursday, 30 March 2006 1:30 PM
To: [email protected]
Subject: [cfaussie] Site Wide Error Template - SQL?
Hi,
The default coldfusion error page includes the SQL of a query if the error
is query related.
Using the site site wide error template, is it possible to get hold of and
display this sql?
Using <cfdump var="#error#" label="error structure">, there is no sql
displayed, and only the error.diagnostic field contains useful
information...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"cfaussie" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/cfaussie
-~----------~----~----~----~------~----~------~--~---