SQL server2000插入中文时出现乱码如何解决? 在线等...
jsp中调用bean:以下是bean里面的方法
public void executeUpdate(String sql)throws Exception{
sql=new String(sql.getBytes("GBK"),"ISO8859_1");
try{
conn=DriverManager.getConnection(sConnStr,username,password);
Statement stmt=conn.createStatement();
stmt.executeUpdate(sql);
conn.close();
stmt.close();
}
catch(SQLException ex){
System.out.println("sql.executeUpdate:"+ex.getMessage());
}
}
这样做也不行!!!