String ip = "10.11.0.1"
pstmt.setString(1, str_ip)
参数不对!

解决方案 »

  1.   

    不好意思,写错了,
    String strSQL="select * from tm_hour_statistics where ip=? order by collecttime";
    String ip = "10.11.0.1";try{
    con = ConnectionManager.getConnection();
    pstmt = con.prepareStatement(strSQL);
    pstmt.setString(1, ip);
    ResultSet rs = pstmt.executeQuery();
    .....
    执行结果 rs没有记录String strSQL="select * from tm_hour_statistics where ip='10.11.0.1' order by collecttime";try{
    con = ConnectionManager.getConnection();
    pstmt = con.prepareStatement(strSQL);
    //pstmt.setString(1, ip);
    ResultSet rs = pstmt.executeQuery();
    .....
    执行结果 rs有记录难道 setString 不能传带点的字符串吗?
      

  2.   

    TO  beijingwhitney(beijing)
       什么意思?