677678679680681682683684685686687
jrs.updateString(2, "insert7"); jrs.insertRow(); jrs.moveToCurrentRow(); int index = 0; jrs.beforeFirst(); while (jrs.next()) { index++; assertEquals(index, jrs.getInt(1)); } assertEquals(7, index);
937938939940941942943944945946947
fail("should throw SQLException"); } catch (SQLException e) { // expected } try { jrs.beforeFirst(); fail("should throw SQLException"); } catch (SQLException e) { // expected } try {
5051525354555657585960
} catch (SQLException e) { // expected, Invalid state } try { jrs.beforeFirst(); fail("Should throw SQLException"); } catch (SQLException e) { // expected, Invalid state }
299300301302303304305306307308309
JdbcRowSet jrs = newJdbcRowSet(); jrs.setUrl(DERBY_URL); jrs.setCommand("SELECT * FROM USER_INFO"); jrs.execute(); jrs.beforeFirst(); assertTrue(jrs.isBeforeFirst()); assertTrue(jrs.next()); assertTrue(jrs.first()); assertFalse(jrs.previous()); assertTrue(jrs.isBeforeFirst());