This looks like bad coding I'm afraid - look at what you are trying to
achieve and look at the example I, and others posted for better examples.





"This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant,
Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions." 
Visit our website at http://www.reedexpo.com

-----Original Message-----
From: [EMAIL PROTECTED]
<[EMAIL PROTECTED]>
To: CFAussie Mailing List <cfaussie@lists.daemon.com.au>
Sent: Thu Nov 10 23:09:44 2005
Subject: [cfaussie] Re: Single Quote Preservation

That's the thing, the error messaged changed for example.

#PresserSingleQuotes(String)#

Produced an error on the single quote and the s Where

'#PreserveSingleQuotes(String)#'

Produced unknown column and as I have updated the drivers I am not going to
be able to repeat this.

Now here is the kicker...

<cfqueryparam ..... >

Produced the same result has '#PreserveSingleQuotes(String)#'

And this

Values ('God's Kitchen 05')

Produced the same error as #PresserSingleQuotes(String)#

Now that I have updated the Macromedia Drivers all the above now work
correctly except for the reason I ran into this problem in the first place
still exists, and has been logged as a bug against MM.

It appears that if a java webservice returns a structured array, this line
of code will not work.

Values ( '#Array[1].getStringValue()#') nor will
'#PreserveSingleQuotes(SQLString)#' nor will <cfqueryparam ....>

However updating the drivers at least allowed me to save the query into a
variable and do this

<cfquery>
  #PreserveSingleQuotes(SQLString)#
</cfquery>

Now as I stated I wrote, and rewrote this code in many ways to find out why
this would not work. And all the code written now works with the latest
drivers.

Now the documentation to CF says that by default Single Quotes are preserved
in a query, so that means this should have worked but it didn't.

<cfset test = "God's Kitchen 05" />
<cfquery>
  Insert into table ( fieldname) values ( '#test#' )
</cfquery>

But it didn't so the next step was to try this.

<cfset test = "God's Kitchen 05" />
<cfsavecontent variable="Andrew">
  Insert into table ( fieldname) values ( '#test#' )
</cfsavecontent>
<cfquery>
  #PreserveSingleQuotes(Andrew)#
</cfquery>

Which is supposed to work as well, and it didn't. But as I stated I upgraded
the Macromedia Drivers to 3.5 and all the above code now works.

So back of Neil, you were not here pulling your hair out on this one. I
was..


Regards
Andrew Scott
Analyst Programmer

CMS Transport Systems
Level 2/33 Bank Street
South Melbourne, Victoria, 3205

Phone: 03 9699 7988  -  Fax: 03 9699 7976

Quote:
98% of all statistics are made up. (Anonymous)
----------------------------------------------------------------------------
--------------------------
-----



---
You are currently subscribed to cfaussie as:
[EMAIL PROTECTED]
To unsubscribe send a blank email to
[EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/
This e-mail is from Reed Exhibitions (Oriel House, 26 The Quadrant,
Richmond, Surrey, TW9 1DL, United Kingdom), a division of Reed Business,
Registered in England, Number 678540.  It contains information which is
confidential and may also be privileged.  It is for the exclusive use of the
intended recipient(s).  If you are not the intended recipient(s) please note
that any form of distribution, copying or use of this communication or the
information in it is strictly prohibited and may be unlawful.  If you have
received this communication in error please return it to the sender or call
our switchboard on +44 (0) 20 89107910.  The opinions expressed within this
communication are not necessarily those expressed by Reed Exhibitions.
Visit our website at http://www.reedexpo.com

---
You are currently subscribed to cfaussie as: archive@mail-archive.com
To unsubscribe send a blank email to [EMAIL PROTECTED]
Aussie Macromedia Developers: http://lists.daemon.com.au/

Reply via email to