以前在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);
总是报错是什么问题,多谢啊!