> -----Original Message-----
> From: Dina Hess [mailto:[EMAIL PROTECTED]
> Sent: Monday, February 24, 2003 12:06 PM
> To: CF-Talk
> Subject: Re: unexpeted result with cfqueryparam

> I agree that Trim() should not influence a single quote. Nor should
> HTMLEditFormat(). But both do, even without CFQUERYPARAM.
>
> Why?

I encountered this some years ago for the first time when I was using
Evaluate() on a form field in my cfquery statement; I think this was on CF
4.0.  I can't be sure about this because I haven't performed any tests with
and without cfqueryparam, but I think CF doesn't automatically escape single
quotes if you are performing ANY functions on the variable inline of the
query.  You have to perform all operations on the variable before you use it
in the SQL statement.  The reason for this, I surmise, is that if you are
performing any operations on the variable, CF leaves it alone as it (maybe)
assumes you want to handle all processing of that variable.

--Andy


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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
Get the mailserver that powers this list at http://www.coolfusion.com

                                Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
                                

Reply via email to