Thanks. But how do you track by this dynamic SQL string to the orignal parent query?
>This is not an SP per se, it is just how SQL handles these dynamic SQL >strings. > >-----Original Message----- >From: Billy Jamme <[EMAIL PROTECTED]> >To: CF-Talk <cf-talk@houseoffusion.com> >Sent: Mon Jul 17 20:44:40 2006 >Subject: Using SQL profiler with cfqueryparam > >Hello All, > >I'm trying to track some slow running queries with MS SQL profiler. If I >use cfqueryparam Coldfusion will automatically convert the query to a stored >procedure. > >For example: > ><cfquery name="test" datasource="MSSQL"> > SELECT > id, user > FROM > userTable > WHERE > id = #form.id# AND > user = #form.user# ></cfquery> > >In MS SQL profiler you will actually see this query in the TextData field; >returning: > > SELECT > id, user > FROM > userTable > WHERE > id = #form.id# AND > user = #form.user# > >However, if you add cfqueryparams to variables in the query, you'll see: > >exec sp_execute 27, '12', '941' > >Where 27 is the stored procedure handler, '12' is the form.id variable and >'941' is the form.user variable. My question is, where does ColdFusion >store the handler information? In other words, how would I track "exec >sp_execute 27, '12', '941'" to the actual query being called. > >Thanks in advance, > >Jim ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting, up-to-date ColdFusion information by your peers, delivered to your door four times a year. http://www.fusionauthority.com/quarterly Archive: http://www.houseoffusion.com/cf_lists/message.cfm/forumid:4/messageid:246821 Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4 Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4