Lazarus
Programming => Packages and Libraries => KOL => Topic started by: Neoc on August 18, 2010, 12:08:11 pm
-
KOL-CE Application, ComboBox1 is TKOLComboBox .
dbf1: TDBF
dbf1.Edit;
dbf1.FieldbyName('CurrentStatus').AsString := ComboBox1.Text;
dbf1.FieldbyName('CurrentID').AsInteger := 1;
dbf1.Post;
dbf1.FieldbyName('CurrentID').AsInteger := 1; This line worked, but
dbf1.FieldbyName('CurrentStatus').AsString := ComboBox1.Text; not work.
Why?
Thanks!
-
ComboBox1.Text is a chinese word.
ComboBox1.Text is KOLString, must change to string?
dbf1.FieldByName('CurrentStatus').AsString := WideCharToString(PWideChar(ComboBox1.Text)); it still doesn't work.
Anybody tell me why?
Thanks!
-
Try this:
dbf1.FieldbyName('CurrentStatus').AsString := UTF8Encode(ComboBox1.Text);