This is not an SP per se, it is just how SQL handles these dynamic SQL
strings.







"This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant,
Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions." 
Visit our website at http://www.reedexpo.com

-----Original Message-----
From: Billy Jamme <[EMAIL PROTECTED]>
To: CF-Talk <[email protected]>
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:246815
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to