Package javax.sql.rowset

Examples of javax.sql.rowset.JdbcRowSet.updateRow()


        }
        jrs.moveToCurrentRow();

        assertTrue(jrs.absolute(3));
        jrs.updateString(2, "update3");
        jrs.updateRow();
        assertTrue(jrs.rowUpdated());
        assertEquals("update3", jrs.getString(2));
        jrs.cancelRowUpdates();
        assertEquals("update3", jrs.getString(2));
View Full Code Here


        jrs.execute();

        assertTrue(jrs.getAutoCommit());
        assertTrue(jrs.absolute(3));
        jrs.updateString(2, "update3");
        jrs.updateRow();
        jrs.rollback();

        // after rollback, resultset is closed
        assertNull(jrs.getStatement());
        try {
View Full Code Here

        jrs.setAutoCommit(false);
        assertFalse(jrs.getAutoCommit());
        assertTrue(jrs.absolute(3));
        jrs.updateString(2, "update3");
        jrs.updateRow();
        jrs.commit();
        jrs.rollback();

        /*
         * TODO why throw NullPointerException after call rollback()?
View Full Code Here

        assertTrue(jrs.absolute(3));
        assertEquals(3, jrs.getInt(1));
        assertEquals("test3", jrs.getString(2));
        jrs.updateString(2, "update3");
        assertFalse(jrs.rowUpdated());
        jrs.updateRow();
        assertTrue(jrs.rowUpdated());
        assertEquals("update3", jrs.getString(2));

        jrs.close();
View Full Code Here

        jrs.setUrl(DERBY_URL);
        jrs.execute();

        assertTrue(jrs.absolute(-2));
        assertEquals("test3", jrs.getString(2));
        jrs.updateRow();
        assertFalse(jrs.rowUpdated());

        jrs.updateString(2, "too looooooooooooooooooooong");
        try {
            jrs.updateRow();
View Full Code Here

        jrs.updateRow();
        assertFalse(jrs.rowUpdated());

        jrs.updateString(2, "too looooooooooooooooooooong");
        try {
            jrs.updateRow();
            fail("should throw SQLException");
        } catch (SQLException e) {
            // expected
        }
        try {
View Full Code Here

        returnRowset.absolute(4);
        assertEquals("test4", returnRowset.getString(2));

        jdbcRs.absolute(3);
        jdbcRs.updateString(2, "Updated 3");
        jdbcRs.updateRow();

        returnRowset.absolute(3);
        assertEquals("test3", returnRowset.getString(2));

        jdbcRs.close();
View Full Code Here

        returnRowset.absolute(4);
        assertEquals("test4", returnRowset.getString(2));

        jdbcRs.absolute(3);
        jdbcRs.updateString(2, "Updated 3");
        jdbcRs.updateRow();

        returnRowset.absolute(3);
        assertEquals("test3", returnRowset.getString(2));

        jdbcRs.close();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.