cheers Adam

yes, that's getting closer. I'll have to put the cfqueryparams in with
string manip but that's on the track

now if I can just tear apart factory.getDebuggingService().getDebugger()
I should get what I want exactly

thanx again
barry.b


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Adam
Cameron
Sent: Wednesday, 1 September 2004 3:03 PM
To: CFAussie Mailing List
Subject: [cfaussie] Re: capturing the executed query?

> I seem to remember (somewhere) a way of getting the actual SQL of a
> query that has been run in a variable (ie: for debugging, etc).

<cfquery name="q" datasource="dsn">
        your query here
</cfquery>

<cfset factory = createObject("java",
"coldfusion.server.ServiceFactory")>
<cfset cfdebugger = factory.getDebuggingService()>
<cfset qEvents = cfdebugger.getDebugger().getData()>
<cfquery dbtype="query" name="cfdebug_queries" debug="false">
        SELECT *, (endTime - startTime) AS executionTime
        FROM qEvents
        WHERE type = 'SqlQuery'
</cfquery>

<cfdump var="#cfdebug_queries#">

Pinched from the debugging template @
CFusionDir]\WEB-INF\debug\classic.cfm

Adam

---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/


---
You are currently subscribed to cfaussie as: [EMAIL PROTECTED]
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to