java部分代码如下:
public int selectid(String uname){
DB db=new DB();
Connection conn = db.getConn();
String sql = "select id from supplier where uname="+uname;
Statement stmt = DB.getStatement(conn);
ResultSet rs = DB.getResultSet(stmt, sql);
try{
if(rs.next()){
this.setId(rs.getInt("Id"));
}
else
{
}

}catch (SQLException e) {
e.printStackTrace();
}finally {
db.close(rs);
db.close(stmt);
db.close(conn);
}
return this.getId();

}
jsp部分代码如下:
String unamef=request.getParameter("uname");
int id=sup.selectid(unamef);
通过unamef参数传值
奇怪的时候当uname是数字字符串时可以
但是当uname是英文字符时 就不可以 
提示说int id=sup.selectid(unamef);这句有问题
哪位高手知不知道什么原因啊