One way around that problem is to write the data to a file and then do a CFINCLUDE on the created data. I had done this before when building complete scripts with queries from user input. I knew I had used CFQUERYPARAM in the strings and had them work. What I had forgotten about was the creation of the file and the include. My mistake.
Yes, it would be much slower but for the system I built speed was not an issue. Also be aware that preservesinglequotes will fail, well won't do what it is supposed to accomplish, when using results of other functions. For example: PreservesingleQuotes(UCase(form.field)) will not work properly if form.field contains single quotes. The form field must be stored in a temporary field and then use as such: Cfset TemporaryField=UCASE(Form.Field) PreserveSingleQuotes(TemporaryField) Ray Thompson Tau Beta Pi (www.tbp.org) The Engineering Honor Society 865-546-4578 -----Original Message----- From: Peter Boughton [mailto:[EMAIL PROTECTED] Sent: Monday, April 28, 2008 9:31 AM To: SQL Subject: Re: Building the where clause using CF It doesn't work. The cfqueryparam will come out as part of the string, not as a tag, and the database will complain about invalid SQL. (If you don't believe me, try it for yourself.) The cfqueryparam tag needs to be inside the cfquery, like the example I supplied previously. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/SQL/message.cfm/messageid:3060 Subscription: http://www.houseoffusion.com/groups/SQL/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.6
