I dont know im afraid, when we finally tracked down the problem we moved the
string functions outside the query so they are performed first, then the
string is passed into the queryparam.

-----Original Message-----
From: Ian Skinner [mailto:[EMAIL PROTECTED]
Sent: Monday, December 8, 2003 15:54
To: CF-Talk
Subject: RE: <cfqueryparam, Oracle and doubling single quotes (').

Sorry, this is on a CFMX 6.0 no updates machine.  

Yes, <cfqueryparam value="#(preserverSingleQuotes(form.note))#" ...> seems
to be working? At least for the moment.  Is there a likely chance that this
could cause me a problem, if/when the incorrect behavior in CFMX is
corrected?

--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

-----Original Message-----
From: Mike Townend [mailto:[EMAIL PROTECTED]
Sent: Monday, December 08, 2003 7:48 AM
To: CF-Talk
Subject: RE: <cfqueryparam, Oracle and doubling single quotes (').

you dont mention which version of CF you are using, but there is a problem
with MX whereby if you use functions to deliver the content then the quotes
dont get escaped correctly.

i.e.

<CFSET sFoo = "Homer's shirt is white">

<CFQUERYPARAM VALUE="#Trim(sFoo)#"...>

will produce double quotes rather than single but

<CFQUERYPARAM VALUE="#sFoo#"...>
or
<CFSET sFoo = Trim(sFoo)>
<CFQUERYPARAM VALUE="#sFoo#"...>

will be OK,  I beleive (got this from another list) that

<CFQUERYPARAM VALUE="#PreserveSingleQuotes(Trim(sFoo))#"...>

will work but i havent tried this.

HTH

-----Original Message-----
From: Ian Skinner [mailto:[EMAIL PROTECTED]
Sent: Monday, December 8, 2003 15:42
To: CF-Talk
Subject: <cfqueryparam, Oracle and doubling single quotes (').

I'm inserting varchar data into a Oracle 8i table using cfqueryparam.  For
some reason, if the data contains a single quote ('), the quote is being
doubled ('') when it is stored in the database.  Is this correct behavior?
Can I eliminate this?  Would PreserveSingleQuotes() be a valid option here?
I thought the cfqueryParam tag was supposed to take care of this?  Is this
just an Oracle thing?  I've got another application where I put large
amounts of prose text with punctuation into a MSSQL database, I don't recall
using PreserveSingleQuotes() with cfqueryParam there.

Thank You

--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

Confidentiality Notice:  This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message.
  _____
   _____
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to