----- Original Message -----
From: "Jim McAtee" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, August 25, 2004 2:03 PM
Subject: Doubling of single quotes in query when using a CF function

> I've got a simple UPDATE query operating in CF5 on an Access 2000 db via
> ODBC.  If a CF function call is used within the query statement for a
> string value, then any single quotes get doubled.  Without the function
> call this doesn't happen.
>
> UPDATE mytable
> SET somefield = '#StripHTML(form.somefield)#'
> WHERE ...
>
> vs.
>
> UPDATE mytable
> SET somefield = '#form.somefield#'
> WHERE ...
>
> Explanation?

>From some more testing, I just found that this only happens when a UDF is
used within the SQL statement.  It doesn't happen with native CF
functions.  For instance, the following will not double the single quotes:

UPDATE mytable
SET somefield = '#Trim(form.somefield)#'
WHERE ...

And it's definitely not happening within the UDF itself.
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to