Page 1 of 1

Illegal mix of collations

Posted: Wed 19 Mar 2014 07:00
by tcflam
Hi all,

I use TUniQuery and statement is "call xxx(id, password)". When I open the TUniQuery, it has the following error
"illegal mix of collations (utf16_unicode_ci,implicit) and (utf8_unicode_ci,implicit) for operation '='".

I checked my database is utf8 and tables option is also utf8. How can I solve this problem?

Thanks!

Re: Illegal mix of collations

Posted: Thu 20 Mar 2014 13:14
by AlexP
Hello,

Please try to set property UseUnicode to True - and let us know the result.

Re: Illegal mix of collations

Posted: Wed 26 Mar 2014 01:44
by tcflam
Hi,

You means MySQL DB property? I set before, but fail. I will try it more detail later.

Re: Illegal mix of collations

Posted: Wed 26 Mar 2014 09:10
by AlexP
You should enable the UseUnicode option in UniConnection before connectiong to the database:

Code: Select all

  UniConnection.SpecificOptions.Values['UseUnicode'] := 'True';
  UniConnection.Connect;

Re: Illegal mix of collations

Posted: Wed 26 Mar 2014 10:38
by tcflam
Hi, I already set it before. Anyway, I will test it again. Thanks!