你可以把执行完第一个查询后得到的resultset存储在几个数组或vector中。

解决方案 »

  1.   

    你在查询过程中使用了同一个Statement对象,另外创建一个肯定成功。
    The object used for executing a static SQL statement and returning the results it produces. By default, only one ResultSet object per Statement object can be open at the same time. Therefore, if the reading of one ResultSet object is interleaved with the reading of another, each must have been generated by different Statement objects. All execution methods in the Statement interface implicitly close a statment's current ResultSet object if an open one exists.
      

  2.   

    建议使用javabean,一些数据库操作放入bean,我想应该更好