Now that I would *almost* understand and forgive. But we seem to have gotten
the error when we added a column that was *not* referenced in the query. So,
all we did was add a column--we didn't alter the query at all. Of course, I
can't recreate on my laptop (running CF8 and SQL2005 locally), but I'll try to
get it to happen again.
Thanks again,
Ben
> 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:296684
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4