Usually, we populate a CachedRowSet in this way:
String queryString = "select * from ... where ..."; PreparedStatement pstm = con.prepareStatement(query