Illegal mix of collations

Discussion of open issues, suggestions and bugs regarding UniDAC (Universal Data Access Components) for Delphi, C++Builder, Lazarus (and FPC)
Post Reply
tcflam
Posts: 62
Joined: Tue 01 Jan 2013 10:48

Illegal mix of collations

Post by tcflam » Wed 19 Mar 2014 07:00

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!

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Illegal mix of collations

Post by AlexP » Thu 20 Mar 2014 13:14

Hello,

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

tcflam
Posts: 62
Joined: Tue 01 Jan 2013 10:48

Re: Illegal mix of collations

Post by tcflam » Wed 26 Mar 2014 01:44

Hi,

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

AlexP
Devart Team
Posts: 5530
Joined: Tue 10 Aug 2010 11:35

Re: Illegal mix of collations

Post by AlexP » Wed 26 Mar 2014 09:10

You should enable the UseUnicode option in UniConnection before connectiong to the database:

Code: Select all

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

tcflam
Posts: 62
Joined: Tue 01 Jan 2013 10:48

Re: Illegal mix of collations

Post by tcflam » Wed 26 Mar 2014 10:38

Hi, I already set it before. Anyway, I will test it again. Thanks!

Post Reply