Package javax.sql.rowset

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


        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));

        assertTrue(jrs.next());
View Full Code Here


        assertEquals("update3", jrs.getString(2));

        assertTrue(jrs.next());
        assertEquals(4, jrs.getInt(1));
        jrs.updateString(2, "update4");
        assertFalse(jrs.rowUpdated());
        assertEquals("update4", jrs.getString(2));
        jrs.cancelRowUpdates();
        assertEquals("test4", jrs.getString(2));

        jrs.close();
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

        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();

        // check db
View Full Code Here

        jrs.execute();

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

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

            fail("should throw SQLException");
        } catch (SQLException e) {
            // expected
        }
        try {
            assertFalse(jrs.rowUpdated());
            fail("should throw SQLException");
        } catch (SQLException e) {
            // expected
        }
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.