Queryparam Issue and Arf
<cfquery name="qry" datasource="dsn"> SELECT adminLocale.* FROM admin JOIN adminLocale ON admin.adminId = adminLocale.adminId WHERE adminLocale.adminId = <cfqueryparam cfsqltype="cf_sql_varchar" value="E322A790-D56F-E112-4B7D2D018B975819">
</cfquery>
<cfdump var="#qry#">
<cfquery name="qry2" datasource="dsn"> SELECT adminLocale.* FROM admin JOIN adminLocale ON admin.adminId = adminLocale.adminId WHERE adminLocale.adminId = <cfqueryparam cfsqltype="cf_sql_varchar" value="E322A790-D56F-E112-4B7D2D018B975819">
</cfquery>
<cfdump var="#qry2#">
<cfabort>
(note: what I am querying isn't an issue as this is just testing) The first query is the query Arf was using for one of my components with white space cleaned up, the other is copied exactly how Arf wrote the query (whitespace and all). However, the first query returns this column list: ADMINID,ADMINLOCALEID,ISDEFAULT,SUPPORTEDLOCALEID and the second returns ADMINID,ADMINLOCALEID,ISDEFAULT,LOCALEID. Notice the last column is different. The first one is returning the proper column (that I recently changed) and the second is not. I believe this is because of the use of the asterisk (rather than actual column names) and the prepared statement allows SQL (I believe or is it on the CF side - see below?) to use cached results (which, in this case miss the db change).
Obviously even a simple change to the whitespace in the query can resolve this and force the query to be re-prepared. However, the query is created dynamically by Arf in this case, so I don't have access to it. After reading this post by Ray Camden, I was able to force the query to be re-prepared by setting the Max Pooled Statements to 0 for my datasource (and then setting it back after re-running the page). I could not find a better way to accomplish this. Anyone got any ideas in case it comes up again?

