Package javax.sql.rowset

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


        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


        }
        jrs.close();

        // after close
        try {
            jrs.commit();
            fail("should throw NullPointerException");
        } catch (NullPointerException e) {
            // expected
        }
        try {
View Full Code Here

        } catch (NullPointerException e) {
            // expected
        }

        try {
            jrs.commit();
            fail("Should throw NullPointerException");
        } catch (NullPointerException e) {
            // expected
        }
View Full Code Here

        JdbcRowSet jrs = newJdbcRowSet();
        jrs.setUrl(DERBY_URL);
        jrs.setCommand("SELECT * FROM USER_INFO");

        try {
            jrs.commit();
            fail("Shuld throw NullPointerException since jrs has not been executed.");
        } catch (NullPointerException e) {
            // Expected.
        }

View Full Code Here

        }

        try {
            assertTrue(jrs.getAutoCommit());
            jrs.setAutoCommit(true);
            jrs.commit();
            // The behaviour of jrs should be same with the connection.

            if (hasCommitException) {
                fail("Should throw SQLException");
            }
View Full Code Here

        jrs.moveToCurrentRow();
        assertTrue(jrs.absolute(6));
        assertEquals(6, jrs.getInt(1));

        // Commits
        jrs.commit();
        assertTrue(jrs.absolute(6));
        assertEquals(6, jrs.getInt(1));
        jrs.commit();
        jrs.close();
    }
View Full Code Here

        // Commits
        jrs.commit();
        assertTrue(jrs.absolute(6));
        assertEquals(6, jrs.getInt(1));
        jrs.commit();
        jrs.close();
    }

    /**
     * @test javax.sql.rowset.JdbcRowTest.rollback()
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.