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

Upon further research this is a SP.  

I pulled the following from Ray Camden's blog.

So this:

<cfquery name="getUser" datasource="#dsn#">
      SELECT    name, Email, userId
      FROM   users   
      WHERE   username = <cfqueryparam cfsqltype="CF_SQL_CHAR" value="joe">
      AND      pin = <cfqueryparam cfsqltype="CF_SQL_INTEGER" value="5555">   
</cfquery>

Translates into this:

<cfquery name="getUser" datasource="#dsn#">
   DECLARE   @param1 varchar(50)
   DECLARE @param2 int = 5555
   
   set @param1 = 'joe'
   set @param2 = 5555
   
   SELECT    name, Email, userId
   FROM   users   
   WHERE   username = @param1
   AND      pin = @param2
</cfquery>

So once the declares are called, it's assigned a dynamic handler in SQL (for 
illustrative purposes handle number 8).  Then calls to this query is handled by 
exec sp_execute statement.   Now here's where I'm a bit confused.   So in this 
example would ColdFusion call: exec sp_execute 8, 'joe', '5555' 

Or would Coldfusion call the about <cfquery> declaration & SQL server is 
dynamically attributing the exec sp_execute statement?   Or is something else 
happening.  

I'll do some more research on this & post the results.  But if anyone else 
knows, please feel free to point me in the right direction.

--bj

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:246885
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