记住,rs.getString()运行的时候 ,不可以回滚,也就是游标不可以回滚
不能rs.getString(2),在运行rs.getString(1)

解决方案 »

  1.   

    更确切一点
    不能 
    rs.geString(2)再运行rs.getString(2);
      

  2.   

    用JDBC2.0的方法,使用可以移动的游标
      

  3.   

    肯定是没有关闭ResultSet,Statement and Connection.查询结束后调用:
    你的ResultSet.close(); 
    你的Statement.close(); 
    你的Connection.close();
      

  4.   

    把字段先读到一个数组中。
    或者
    用一个变量来存! String bianliang=rs.getString(2);
    然后bianliang 进行操作。或者把指针形式改一下。
    stmt=conn.createStatement(java.sql.ResultSet.CONCUR_READ_ONLY,java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE);