macromedia.coldfusion.database_access
[Top] [All Lists]

Re: MS SQL - Syntax error for valid query

Subject: Re: MS SQL - Syntax error for valid query
From: Ian Skinner <iskinner@xxxxxxxxxxx>
Date: Tue, 29 Jan 2008 12:16:28 -0800
Newsgroups: macromedia.coldfusion.database_access


AWFrueh1808 wrote:
Gotcha.  So the single quotes are indeed only escaped as part of a SQL 
statement (or more accurately, as part of a CFQUERY.  When you CFOUTPUT the 
same variable, the quotes will not be escaped?

Yes they are only escaped when inside a <cfquery...> block to build the SQL statement that is sent to the database. Thus the preserveSingleQuotes() parameter is only meaningful inside a <cfquery...> block. Otherwise it just returns the same string it was passed.


<Prev in Thread] Current Thread [Next in Thread>