if I run the following in HeidiSQL, I get the collation for CFC is (blank) which I assume refers to the default collation for the database of utf8_general_ci. If I run it with TMyQuery, the default collation is latin1_swedish_ci. Is there a setting I am missing for this or is MyDAC doing something odd? I am running XE3 and version 8.3.8 for RAD Studio XE3. I am running MySQL 5.5.27.
drop table if exists _answer;
create table _answer
select distinct d.id, cast("" as char(1)) as CFC from donmail d
where d.id <280
Swedish Collation used on Cast
Re: Swedish Collation used on Cast
ok, I found that you need to set Charset in the TMyConnection component. I guess it defaults to Swedish if left blank even though I had the default set in MySQL to utf8.
Re: Swedish Collation used on Cast
It is good to see that the problem has been solved.
The default collation for MySQL is latin1_swedish_ci. If you don't set the TMyConnection.Options.Charset property, then when creating a char or varchar field, the latin1_swedish_ci collation is used by default.
More details about the default collation for MySQL can be found at http://dev.mysql.com/doc/refman/5.6/en/ ... mysql.html
The default collation for MySQL is latin1_swedish_ci. If you don't set the TMyConnection.Options.Charset property, then when creating a char or varchar field, the latin1_swedish_ci collation is used by default.
More details about the default collation for MySQL can be found at http://dev.mysql.com/doc/refman/5.6/en/ ... mysql.html