Open GoogleCodeExporter opened 9 years ago
大家好!
是否有朋友用过assql 访问mysql,小弟在处理中文字符时出现问题。
查询的时候中文问题已经解决。
源码:
sql =" insert into sc_user (user_name) values('中文')";
public function insertData(sql:String):void{
var st:Statement = conn.createStatement();
var token:MySqlToken = st.executeQuery(sql);
token.addResponder(new AsyncResponder(
function(data:Object, token:Object):void {
trace(data.insertID);
Alert.show("保存成功!");
//sendNotification( ApplicationFacade.INSERT_DATA,"success" );
},
function(info:Object, token:Object):void {
//sendNotification( ApplicationFacade.INSERT_DATA,"fail" );
Alert.show("Error: " + info);
},
token
));
抛出错误异常:
Error: SQL Error #22021: Incorrect string value: '\xD6\xD0\xCE\xC4' for column 'user_name' at row 1
问题所在:
assql 底层应该是用socket传数据的,应该是在传数据的时候做了编码。
是否要改assql的底层,有没有童学遇到过。
请各位不吝赐教,谢谢
Original comment by Chunyi.Z...@gmail.com
on 12 Jun 2011 at 1:51
Original issue reported on code.google.com by
hell_wu...@163.com
on 6 Jan 2010 at 10:15