【问题标题】:How to populate 2 CachedRowSet with the same ResultSet?如何使用相同的 ResultSet 填充 2 个 CachedRowSet?
【发布时间】:2011-07-29 16:49:58
【问题描述】:

我需要使用CachedRowSet 或任何其他可能的方式复制ResultSet 的帮助。我在这一点上

ResultSet rs = stmt.executeQuery(query);

CachedRowSetImpl crs = new CachedRowSetImpl();
crs.populate(rs);

如何使用ResultSet rs 填充不同的CachedRowSet,例如crs2

【问题讨论】:

    标签: java database oracle resultset cachedrowset


    【解决方案1】:

    做一个深拷贝试试

    CachedRowSet crs2 = crs.createCopy();
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2017-08-01
      • 2017-02-24
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多