Page 1 of 1

Mysql UTF8 : EInvalid Cast with message 'Invalid Class typecast'

Posted: Mon 26 Mar 2007 20:13
by Hans
Hi,

I changed character set from latin1 to utf8 and i get 'Invalid Class typecast'. Delphi debugger does not help me very much.

Does this have to do enything with the corelab components?

Should i change anything else in the database to get utf8 working?

Thanks!

best regards,
Hans

Posted: Tue 27 Mar 2007 06:55
by Hans
Well it might have to to something with mysql upgrade 5.027 to 5.0.37.

Posted: Tue 27 Mar 2007 09:19
by Hans
Hi,

It looks like my problem was caused by a bug in de TMyQuery component. A copy of the component seems to work fine. So i deleted the original.

best regards,
Hans

Posted: Tue 27 Mar 2007 11:20
by Antaeus
Most possible reason of this problem is that you have created fields for the query in design time. All the string fields were interpreted as TStringField with the latin1 character set. But after you changed character set to utf8, all the string fields are interpreted as TWideStringField.
You could fix this problem just by recreating fields in design time.