Trying to insert values with Unicode Chars into a MySQL-database using Delphi 2010 and TADOConnection with no luck.
Connection with ODBC
Provider=MSDASQL.1;Persist Security Info=False;Data Source=mysrc;Initial Catalog=mydb
The SQL command:
INSERT INTO myTable (aCol) VALUES('Russian: русский язык')
Tried inserting it directly with
TADOConnection.Execute(SQL)
It only ends up in the database as "Russian: ??????? ????"
Also tried the method suggested here:
http://www.3delite.hu/Object%20Pascal%20Developer%20Resources/delphiunicodemysqltutorial.html
With TADOQuery do
begin
SQL.Clear;
SQL.Add('INSERT INTO myTable (aCol) VALUES(:p));
Parameters.ParamByName('p').DataType := ftWideString;
Parameters.ParamByName('p').Value := 'Russian: русский язык';
ExecSQL;
end;
Making this in code doesn't work at all for me, only if I add parameters in designtime, but then it's still the same result in the database with questionmarks all over.