首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Exception >

java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) an

2014-01-26 
java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (gb2312_chinese_ci

java.sql.SQLException: Illegal mix of collations (latin1_swedish_ci,IMPLICIT) an
  d (gb2312_chinese_ci,COERCIBLE) for operation '='
  tomcat的字符集设置为:gb2312,现在数据库已经建好,如何改表的字符集?
  或那位有更好的解决方法!

------解决方法--------------------------------------------------------
String name;
  if(name!=null) name=new String(name.getBytes("ISO8859_1"),"GBK");

        

热点排行