In our ColdFusion 11 app with SQL Server 2008 R2. A .cfm file is using a CF component that is called with a syntax such as:
<cfscript>
objMyTable = createobject('component','components.myTable);
qmyTable2list = objMyTable.loadAllCustomers();
qresultset = objMyTable.loadCustomersResultset(form.applicant_type, form.customer_name, form.state, form.orderby);
</cfscript>
The CF component has SQL Statements such as the one shown below:
<cfquery name="result_set" dataSource="#request.dsn_name#">
select name, state from myTable #REReplace(where_clause,"''","'","ALL")#
</cfquery>
When we click a button on .cfm page, the app correctly displays data from SQL Server 2008-R2. But SQL Profiler does not catch these SQL statements. When we run the profiler on .cfm pages that are using embedded cfquery tags for sql queries (instead of CF components) the SQL profiler displays all the queries executed by the page. Question: How can we make SQL Profiler catch the queries inside the CF component?