Your problem sparked a thought about a different table caching problem
we had earlier this year. 

Make sure that in the "Advanced Settings" in the CF ADMIN you set "Max
pooled Statements to 0.

Otherwise, If you make a change to the table structure, it will be
cached until you re-submit the datasource in the CF ADMIN, and your
query will error out if you try to insert or update into your new
column.

Setting the max pooled statements to 0 solves this problem.

Ryan Duckworth 
Macromedia ColdFusion Certified Professional
Uhlig Communications 
10983 Granada Lane 
Overland Park, KS 66211
(913) 754-4272

-----Original Message-----
From: Jim McAtee [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, October 19, 2004 2:42 PM
To: CF-Talk
Subject: Re: Cached Query and CFQUERYPARAM

Whoops.  Brain fart.  I had removed the cfqueryparam from the WHERE 
clause...  Makes sense now.


----- Original Message ----- 
From: "Jim McAtee" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, October 19, 2004 1:36 PM
Subject: Cached Query and CFQUERYPARAM


> If I've got a query using a CFQUERYPARAM in the WHERE clause and then
> attempt to cache that query, will the query remain in CF's cache when
> called with different values for the queryparam?
>
> For example, the table 'mytable' is a very small table with just 5
rows:
>
> <cfquery datasource="#dsn#" name="myquery">
> SELECT something, somethingsomething
> FROM mytable
> WHERE mytableid = <cfqueryparam cfsqltype="cf_sql_integer"
value="#id#">
> </cfquery>
>
> And if I call that query alternately with different identifiers, 1, 2,

> 3,
> etc., will the query remain cached?  In CF's debugging output I'm
seeing
> 'Time=Cached Query', but I don't understand how CF could cache the
query
> unless it caches the query results for each possible queryparam value.




~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Sams Teach Yourself Regular Expressions in 10 Minutes  by Ben Forta 
http://www.houseoffusion.com/banners/view.cfm?bannerid=40

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:181931
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to