Does your query do "select * ..." or "select fieldname, ..."?  

We always avoid "select * ..." and that avoids lots of potential issues
with caching in CF or in the SQL server (and I think it makes for
easier-to-maintain code, even though it is more verbose).

Thanks
        Mark

-----Original Message-----
From: Ben Mueller [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, January 16, 2008 11:17 AM
To: CF-Talk
Subject: cfqueryparam, cached execution plans, and changing table
structure

We hit a problem with morning relating to cfqueryparam.  A query using
cfqueryparam referenced a table whose structure had been changed (we
added a column).  It appears the execution plan had been cached, and
either CF7 or SQL Server 2000 wasn't smart enough to figure out that the
table had changed, and so the query bombed.  I found an old post on it
here:

http://www.coldfusionjedi.com/index.cfm?mode=entry&entry=7D417738-DF64-B
270-3056B422E2F6FCAB

.....and it seems the only solutions are to cycle the CF service or
change any query (in some minor way) to force CF to create a new
execution plan.  Frankly, both of those solutions blow.  We're
constantly updating our site, and if we have to cycle the CF service on
our production servers every time we make a database change, we'll
simply be forced to abandon cfqueryparam entirely.  

Somebody please tell me there's some other solution here.  

Thanks in advance,
Ben 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:296757
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to