782783784785786787788789790791792
} public void testFindColumn() throws Exception { JdbcRowSet jrs = newJdbcRowSet(); try { jrs.findColumn("abc"); fail("should throw SQLException"); } catch (SQLException e) { // expected } jrs.setCommand("SELECT * FROM USER_INFO");
791792793794795796797798799800801
} jrs.setCommand("SELECT * FROM USER_INFO"); jrs.setUrl(DERBY_URL); jrs.execute(); assertEquals(1, jrs.findColumn("ID")); try { jrs.findColumn("abc"); fail("should throw SQLException"); } catch (SQLException e) { // expected
793794795796797798799800801802803
jrs.setUrl(DERBY_URL); jrs.execute(); assertEquals(1, jrs.findColumn("ID")); try { jrs.findColumn("abc"); fail("should throw SQLException"); } catch (SQLException e) { // expected }
196197198199200201202203204205206
} catch (SQLException e) { // expected, Invalid state } try { jrs.findColumn("ID"); fail("Should throw SQLException"); } catch (SQLException e) { // expected, Invalid state }
971972973974975976977978979980981
fail("should throw SQLException"); } catch (SQLException e) { // expected } try { jrs.findColumn("abc"); fail("should throw SQLException"); } catch (SQLException e) { // expected } try {