Princesden
Princesden

Reputation: 33

How to populate 2 CachedRowSet with the same ResultSet?

I need help with duplicating a ResultSet using CachedRowSet or any other way possible. I'm at this point

ResultSet rs = stmt.executeQuery(query);

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

How would one populate a different CachedRowSet, say crs2, with the ResultSet rs?

Upvotes: 1

Views: 1606

Answers (1)

Kevin Burton
Kevin Burton

Reputation: 11936

to do a deep copy try

CachedRowSet crs2 = crs.createCopy();

Upvotes: 1

Related Questions