从SQL Server中得到的ResultSet如何转换为RowSet

解决方案 »

  1.   

    API文档中写的,public interface RowSet extends ResultSet,RowSet接口继承了ResultSet接口,具体转换没有试验过
      

  2.   

    为什么要转换,难道resultset不好用么?
      

  3.   

    念段咒语就可以了,至于咒语的内容Google一下就知道了
      

  4.   

    ok了import com.sun.rowset.CachedRowSetImpl;
    protected RowSet populate(ResultSet rs) throws SQLException 
    {
    CachedRowSetImpl crs = new CachedRowSetImpl();
    crs.populate(rs);
    return crs;
    }