On 17 Apr 2001, at 10:09, Gil Barden wrote:
> <cfquery name="dynQuery" datasource="xxx" username="xxxx"
> password="xxxx">
> #form.sql#
> </cfquery>
Your description was wrong. It's not that the single quote is
being changed to a double quote; it's being changed to two
single quotes, which may look like a double quote in your font.
Anyway, the problem is that if you construct an SQL statement
in a variable and then put in inside a CFQUERY the single
quotes get doubled. CF does this to be helpful, since it's
what you'd want if you were interpolating variables to produce
values in a query. To keep CF from doing that, use
PreserveSingleQuotes():
<cfquery name="dynQuery" datasource="xxx" username="xxxx"
password="xxxx">
#PreserveSingleQuotes(form.sql)#
</cfquery>
Keith C. Ivey <[EMAIL PROTECTED]>
Webmaster, EEI Communications
66 Canal Center Plaza, Suite 200
Alexandria, VA 22314
Telephone: 703-683-0683
Fax: 703-683-4915
Web Site: http://www.eeicommunications.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists