Ask a Question related to Coldfusion Database Access, Design and Development.
-
achab23 #1
CF7 query update with single quote
Hi
i'm migrating an application from CF5 to CF7 (hotfix3) and have the following
problem:
the query
<cfquery...>
UPDATE t1
SET f1 = '#var1#'
</cfquery>
does not work fine when I have 2 single quote in var1 (let's say var1 = "''")
in the database (SQL server 2000 sp4) the above query insert 1 single quote
only
It seems to me a bug in escaping the single quote
any suggestion or workaround?
thanks
stefano
achab23 Guest
-
Single & Double Quote Problem in Database Insert/Update
Hello, I have a textarea on a form where users are able to enter text wrapped in 'single' and "double" quotes. However, when I insert or update... -
SQL insert/update problem if coldfusion field value has single quote
On the coldfusion form, if the user enter the data with single quote in a field (e.g. Joe's Party), and performs SQL insert or update statements,... -
Query of Query with single quote (')
I have a query object with a last name column. We use query of query against the object. When there's a record with a last name that has a... -
Passing Parameters with Single Quote
I am trying to pass this information to another cfm file. This works fine, except when the name has a single quote (ie. Name = Katie's car). What... -
exec, single quote & security...
Hello, (i'm particulary interested in security issue - php is running on apache + linux) i need to pass the result (here $exp) of a form... -
achab23 #2
Re: CF7 query update with single quote
Hi
found the following fix in CF6.1 - but cannot apply the fix to CF7, of course
[url]http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_19108[/url]
ColdFusion MX 6.1: Hot fix for cfquery/cfqueryparam
Macromedia has created a hot fix to address the following issues with cfquery
and cfqueryparam in Macromedia ColdFusion MX 6.1:
53852 - When a string expression is evaluated inside a cfquery tag, each
single quote character is escaped to two single quotes. In certain cases, such
as when complex CFML expressions are evaluated in a cfquery tag especially
within a cfloop, the single quotes may be repeatedly escaped.
achab23 Guest
-
raymacro #3
Re: CF7 query update with single quote
Did you ever find a resolution to this problem in CF 7? I am running into the same issue. I found the 6.1 solution as well, but nothing for 7.
raymacro Guest
-
Dan Bracuk #4
Re: CF7 query update with single quote
Either preservesinglequotes or cfqueryparam should solve your problem.
Dan Bracuk Guest
-
raymacro #5
Re: CF7 query update with single quote
:D Worked like a charm. Thanks sooo much!
raymacro Guest
-
cfdba #6
Re: CF7 query update with single quote
Please let me know what exactly u did to get around this problem on 6.1 as well as 7 MX.
TIA
cfdba Guest



Reply With Quote

