Sean.. i noticed a problem with CFMX and single quotes in a query...Query failed to execute... and the debug code showed something like
select * from TableName where myField=apos;BMWapos; it was replacing "'" with string "apos;" . I tried a few things(preserve, build string.. and some others). None of them worked. I finally restarted the CFMX service.. and the query started working again. Strange... Any idea.. how this might happen? Thanks Joe On Fri, 13 Dec 2002 10:40:11 -0800 Sean A Corfield <[EMAIL PROTECTED]> wrote: > Use preserveSingleQuotes() > > (I wonder how many identical answers we'll get > for this frequently > asked chestnut? :) > > On Friday, Dec 13, 2002, at 09:29 US/Pacific, > Wurst, Keith D. wrote: > > > Hi everyone. I'm having a problem with single > quotes. I'm building the > > "where" part of a sql statement dynamically. > So, I have a variable > > called > > where_query. When I display where_query on > the page I see: > > > > where ( title like '%Cancer%') or > (duration_start >= '1/13/2002') or > > (amount_requested > 5000) > > > > But when I then put it into a sql statement > it looks like this > > > > where ( title like ''%Cancer%'') or > (duration_start >= ''1/13/2002'') > > or > > (amount_requested > 5000) > > > > Does anyone know where those extra single > quotes came from? Anyone > > know how > > I might be able to get rid of them? Thanks > very much. > > Keith > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm

