以前在tomcat下面都没有问题,今天把以前的程序拿出来重新配置下总遇到这样的bug
javax.servlet.ServletException: General error, message from server: "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (gb2312_chinese_ci,COERCIBLE) for operation '='"
我的sql这样写的
String name="xw";
String password="xw";
String strSQL = "select id from admin where username='" + name + "'" + "and password = " + "'" + pwd + "'";
ResultSet rs = stmt.executeQuery(strSQL);
总是报错是什么问题,多谢啊!
javax.servlet.ServletException: General error, message from server: "Illegal mix of collations (latin1_swedish_ci,IMPLICIT) and (gb2312_chinese_ci,COERCIBLE) for operation '='"
我的sql这样写的
String name="xw";
String password="xw";
String strSQL = "select id from admin where username='" + name + "'" + "and password = " + "'" + pwd + "'";
ResultSet rs = stmt.executeQuery(strSQL);
总是报错是什么问题,多谢啊!
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货