In CFMX 8 you have the cfquery returns the sql, so you can log the
statement like:

<cflog text="#query_name.sql#" file="sqllog">

For prior versions I think the only way is to store the sql in a
variable and use the variable both in cfquery and cflog, like:

<cfquery name="test" datasource="sql">
   <cfsavecontent variable="statement">
      Insert into table (columns) (values)
   </cfsavecontent>
   #PreserveSingleQuotes(statement)#
</cfquery>
<cflog text="#statement#" file="sqllog">


On Mar 25, 7:28 pm, Xen <[EMAIL PROTECTED]> wrote:
> Is there any way to log a cfquery statement? I need to do something
> like...
>
> <cfquery name="test" datasource="sql">
>  Insert into table (columns) (values)
> </cfquery>
>
> Is it possible to log the query statement?
>
> Thanks for any help. I'm using cf7 and sql2000.
>
> -Ben
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"CFCDev" 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/cfcdev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to