I've got a cfquery built with cfloop like so:
<cfquery name="AddClicker" datasource="#DS#" username="#DSUsername#"
password="#DSPassword#">
INSERT INTO Clickers (#myFieldList#)
<cfset myLoopCount=0>
VALUES
(
<cfloop list="#myFieldList#" index="i">
'#Trim(Evaluate("form.#i#"))#'
<cfset myLoopCount=incrementValue(myLoopCount)>
<cfif myLoopCount LT ListLen(myFieldList)>,</cfif>
</cfloop>
)
</CFQUERY>
Problem is, using the Evaluate function to get my values bypasses CF's
built-in single quote escaping mechanism, and this query will throw an ODBC
error when trying to insert a field with a single quote.
What is the syntax to escape a single quote for SQL Server 7, so I can
manually replace those chars prior to insertion?
thx,
Ron
------------------------------------------------------------------------------
Archives: http://www.mail-archive.com/[email protected]/
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk or send a
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.