use result.close
and connection.close()

解决方案 »

  1.   

    不对,是他先用了use result.close
    and connection.close()然后再使用
      

  2.   

    兄台在你使用 close() 方法后不要再用你已经 closed 的对象了或者你在使用完它之后再 close() 它OK ?
      

  3.   

    connection is already closed or connection is failed.
      

  4.   

    Connection conn = ...;
    Statement stmt=conn.createStatement();
    String sql = "Select ... From ... Where ...";
    ResultSet rs = stmt.executeQuery(sql);
    if( !rs.next() )
    {
    rs.close();
    stmt.close();
    conn.close();
    }
    String str... = rs.getString("...");
    ...
    rs.close();
    stmt.close();
    conn.close();
    //在此就不能用rs,stmt,conn等对象了除非你再重新open