Ben Mueller wrote:
> <cfquery>
> SELECT firstname
>   FROM user
>  WHERE email = <cfqueryparam cfsqltype="varchar" value=#form.email#>
> </cfquery>
> 
> MS SQL Server caches the execution plan.  Then, I add a "lastname" column to 
> the user table.  I don't change the query at all.  I re-hit the query while 
> the execution plan is cached.  It breaks?

Probably not if you add a column, only if you delete one and keep 
referencing it:
<cfquery>
   CREATE TABLE user (A, B, C)
</cfquery>

<cffunction name="test>
   <cfquery>
     SELECT *
     FROM user
     WHERE A = <cfqueryparam cfsqltype="varchar" value=#form.email#>
   </cfquery>
</cffunction>
<cfset test()>
<cfquery>
   ALTER TABLE user DROP COLUMN C
</cfquery>
<cfset test()>

Jochem


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;160198600;22374440;w

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:296682
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to