View SQL before execution?
I'm a newbie to CF, so I apologize in advance as I've searched everywhere and cannot find the answer to the following. I have a .html forms page that submits user-entered data to a .cfc for insertion into a MySQL db (insert code is below.) The insert statement isn't working, and I don't get an error returned, so I'd like to view what the compiled SQL INSERT statement looks like before it actually attempts to hit the database. This way I can copy and paste the SQL into my DB and see if I can debug. I can confirm I am capturing all data from the .html page before submission to the .cfc. Any and all assistance is greatly appreciated. Thanks!
<cfquery name="qInsertEvent" datasource="dsnMySQL">
INSERT INTO
tblEvents
(event_type, event_status, event_category, event_name, event_date, event_stateCode
<!--Optional fields: NULL-->
<cfif isDefined("arguments.event_city")>,event_city</cfif>
<cfif isDefined("arguments.event_venue")>,event_venue</cfif>
<cfif isDefined("arguments.event_timeStr")>,event_time</cfif>)
VALUES
(2, 'A',
<cfqueryparam value="#arguments.event_category#" cfsqltype="cf_sql_varchar"/>,
<cfqueryparam value="#arguments.event_name#" cfsqltype="cf_sql_varchar"/>,
<cfqueryparam value="#arguments.event_dateStr#" cfsqltype="cf_sql_varchar"/>,
<cfqueryparam value="#arguments.event_stateCode#" cfsqltype="cf_sql_varchar"/>,
<!--Optional fields: NULL-->
<cfif isDefined("arguments.event_city")>
<cfqueryparam value="#arguments.event_city#" cfsqltype="cf_sql_varchar"/>,
</cfif>
<cfif isDefined("arguments.event_venue")>
<cfqueryparam value="#arguments.event_venue#" cfsqltype="cf_sql_varchar"/>,
</cfif>
<cfif isDefined("arguments.event_timeStr")>
<cfqueryparam value="#arguments.event_timeStr#" cfsqltype="cf_sql_varchar"/>
</cfif>)
</cfquery>
