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/

Reply via email to