Page 1 of 1

Cyrillic Problem

Posted: Sat 08 Jul 2006 17:25
by dsedov
If I type in all the fields in English then everything works, however, if I type in fields with cyrillic symbols I get an error: ... raised exception class EMySqlException with message ' #33001 Data too long for column 'first_name' at row 1'

Here is my code:

SqlQuery->SQL->Clear();
SqlQuery->SQL->Add("INSERT INTO users (id, first_name, last_name, email, phone, type, login, password) VALUES (NULL, '"
+ pFirstName->Text +"', '"
+ pLastName->Text +"', '"
+ pEmail->Text +"', '"
+ pPhoneNumber->Text +"', '"
+ pType->Text +"', '"
+ pLogin->Text +"', '"
+ pPassword->Text +"')");
SqlQuery->Execute();

Posted: Mon 10 Jul 2006 11:37
by Antaeus
Please check if Charset option of MyConnection is set to cp1251. Remember that you have to set corresponding character set to the server objects (tables, databases) too.