![]() |
| |||
| Hi All I use MySql 5.1£¬and I write an Ado class to visit MySql DB. but it always occurs a error when it executes a "Insert"--statement . Insert Statemet: Insert into T_AddressGroup(F_Owner,F_GroupName,F_Desc) values('admin','ÅóÓÑ×é','ÅóÓÑ×é'); Error Informatin: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1 but i execute successful:Insert into T_AddressGroup(F_Owner,F_GroupName,F_Desc) values('admin','aaa','aaa'); MySql characterSet: mysql> show variables like '%char%'; +--------------------------+--------------------------+ | Variable_name | Value | +--------------------------+--------------------------+ | character_set_client | gbk | | character_set_connection | gbk | | character_set_database | gbk | | character_set_filesystem | binary | | character_set_results | gbk | | character_set_server | gbk | | character_set_system | utf8 | | character_sets_dir | D:\MySql\share\charsets\ | +--------------------------+--------------------------+ 8 rows in set (0.00 sec) mysql> Insert into T_AddressGroup(F_Owner,F_GroupName,F_Desc) values('admin',_gb k'ÅóÓÑ×é',_gbk'ÅóÓÑ×é'); Query OK, 1 row affected (0.05 sec) mysql> select * from T_addressGroup; +------+---------+-------------+--------+ | F_Id | F_Owner | F_GroupName | F_Desc | +------+---------+-------------+--------+ | 1 | admin | ÅóÓÑ×é | ÅóÓÑ×é | +------+---------+-------------+--------+ 1 row in set (0.00 sec) mysql> Insert into T_AddressGroup(F_Owner,F_GroupName,F_Desc) values('admin','Åó ÓÑ×é','ÅóÓÑ×é'); Query OK, 1 row affected (0.05 sec) mysql> select * from T_addressGroup; +------+---------+-------------+--------+ | F_Id | F_Owner | F_GroupName | F_Desc | +------+---------+-------------+--------+ | 1 | admin | ÅóÓÑ×é | ÅóÓÑ×é | | 2 | admin | ÅóÓÑ×é | ÅóÓÑ×é | +------+---------+-------------+--------+ 2 rows in set (0.00 sec) |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |