Reputation: 9644
I have a <cfquery>
which generates some SQL inside. It's failing, but I have no idea why. I tried wrapping it inside a <cftry> <cfcatch>
block, and dumping the result. However, result is undefined. Is there another way to see what the SQL looks like?
Upvotes: 2
Views: 465
Reputation: 10473
Remove your cfquery and replace with cfoutput. You can remove the cfqueryparam and just output the values. You should produce a SQL statement that will run fine in a query analyzer.
Upvotes: -1
Reputation: 18090
Inside your <cfcatch>
, do this:
<cfdump var="#cfcatch#"><cfabort>
This should show you the query that it tried to run.
Upvotes: 10
Reputation: 565
If it fails and the error isn't showing SQL, then it may be an issue with the cfqueryparam, maybe a datatype mis-match, can you provide the text of the error? Maybe even the SQL code?
Upvotes: 2