you are so right! this is most excellent! thanks for pointing this out
here and on your blog!

in case of using a custom mysql jdbc connector instead of cf's built-in
one (i.e. on CFMX7 connecting to mysql 5), you can also add the same
query string directly to the jdbc url:

jdbc:mysql://localhost:3306/databasename?useUnicode=true&characterEncoding=utf8&characterSetResults=UTF-8&sessionVariables=sql_mode=NO_BACKSLASH_ESCAPES

iirc, the connection string box in the dsn setup in cf admin did not
[always] work with mysql connector/j, i.e. putting the above
Unicode-related params there did not work, but they worked fine aded to
the jdbc url...

Azadi Saryev
Sabai-dee.com
http://www.sabai-dee.com/



Brad Wood wrote:
>> there appears to be no jdbc connector option to change this behaviour,
>> so have to do in server config/start...
>>
>>     
>
> Sorry to drag up an old thread, but I wanted a record of this for anyone 
> reading the archives.  There IS a JDBC URL option to disable backslash 
> escaping in MySQL on a datasource level.  Add 
> "sessionVariables=sql_mode=NO_BACKSLASH_ESCAPES" (without the quotes) in to 
> the Connection String box in the Advanced Settings of your datasource.  
> Remember, mulitple connection string properties are delimited by an ampersand 
> with MySQL, so if you allowed multiple queries AND disabled backslash 
> escaping, your connection string would be 
> "allowMultiQueries=true&sessionVariables=sql_mode=NO_BACKSLASH_ESCAPES"
>
> ~Brad 
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;203748912;27390454;j

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:311145
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to