when i execute this code i get "SQL syntax error near ')'" for some reason...
when i change ParamByName.AsWideString to ParamByName.Value, my comand execute fine without errors....
table in my database is in utf8 with one text and one varchar field...
thanks in advance..
edit: i use rad studio 2010 and mysql 5.1 on win7 pro...
Code: Select all
with TZQuery.Create(Self) do
try
Connection := ZConnection1;
Close;
SQL.Clear;
SQL.Add('INSERT INTO cyrtbl');
SQL.Add('(c1, c2)');
SQL.Add('VALUES (:c1, :c2)');
ParamByName('c1').AsWideString := LabeledEDit1.Text;
ParamByName('c2').AsWideString := RichEdit1.Text;
ExecSQL;
finally
Free;
end;