日期:2014-05-17 浏览次数:20742 次
String sql = "select * from yxwl_userlog where yxwl_id=@yxwl_id ";
Map<String,String> map= new HashMap<String,String>();
map.put("@yxwl_id", yxwl_id);
ResultSet rs = null;
yxwl_userLog rt=null;
rs=MySqlHelper.executeQuery(sql, map);
调用下面代码时出现错误
/**
* 查【Query】
* @param sql
* @param obj
* @return ResultSet
*/
public static ResultSet executeQuery(String sql, Object... obj) {
Connection conn = null;
PreparedStatement pstmt = null;
ResultSet rs = null;
try {
conn = getConnect();
pstmt = conn.prepareStatement(sql);
for (int i = 0; i < obj.length; i++) {
pstmt.setObject(i + 1, obj[i]); // <-----这理出错
}
rs = pstmt.executeQuery();
} catch (SQLException err) {
err.printStackTrace();
free(rs, pstmt, conn);
}
return rs;
}
java.sql.SQLException: Invalid argument value:
jsp页面等待显示结果时的等待界面效果如何做