Examples of deleteRow()


Examples of java.sql.ResultSet.deleteRow()

        rs.last();
        assertEquals("CurrentPosition should be " + lastRow,
                rs.getRow(), lastRow);
        assertTrue("isLast() should return true", rs.isLast());
        // should be able to delete the row
        rs.deleteRow();

        // Test that it is possible to move beforeFirst from insertRow
        currentPosition = rs.getRow();
        rs.moveToInsertRow();
        rs.updateInt(1, currentPosition + 1000);
View Full Code Here

Examples of java.sql.ResultSet.deleteRow()

        ResultSet rs = s.executeQuery("select a,b from t1");
        rs.next();
        rs.updateInt(1, rs.getInt(1) + 2 * recordCount);
        rs.updateRow();
        assertTrue("Expected rowUpdated() to return true", rs.rowUpdated());
        rs.deleteRow();
        rs.next();
        rs.previous();
        assertTrue("Expected rowUpdated() to return true", rs.rowUpdated());
        assertTrue("Expected rowDeleted() to return true", rs.rowDeleted());
        rs.next();
View Full Code Here

Examples of java.sql.ResultSet.deleteRow()

        rs.afterLast();
        checkDetectabilityCallsOutsideRow(rs, "on afterLast row");

        rs.first();
        rs.deleteRow();
        checkDetectabilityCallsOutsideRow(rs, "after deleteRow");

        rs.last();
        rs.deleteRow();
        checkDetectabilityCallsOutsideRow(rs, "after deleteRow of last row");
View Full Code Here

Examples of java.sql.ResultSet.deleteRow()

        rs.first();
        rs.deleteRow();
        checkDetectabilityCallsOutsideRow(rs, "after deleteRow");

        rs.last();
        rs.deleteRow();
        checkDetectabilityCallsOutsideRow(rs, "after deleteRow of last row");

        rs.close();
        s.close();
View Full Code Here

Examples of java.sql.ResultSet.deleteRow()

        rs.updateInt(2, 666);
        rs.updateRow();
        checkDetectabilityCallsOutsideRow(rs, "after FO updateRow");

        rs.next();
        rs.deleteRow();
        checkDetectabilityCallsOutsideRow(rs, "after FO deleteRow");

        while (rs.next()) {};
        checkDetectabilityCallsOutsideRow(rs, "after FO emptied out");
View Full Code Here

Examples of java.sql.ResultSet.deleteRow()

            ResultSet rs = statement.executeQuery(select);

            while (rs.next()) {
                String s = rs.getString(2);

                rs.deleteRow();
            }

            rs.close();

            rs = statement.executeQuery(select);
View Full Code Here

Examples of java.sql.ResultSet.deleteRow()

            while (rs.next()) {
                int num = rs.getInt("num");

                if ((num % 7) == 0) {
                    System.out.println("Deleting row:" + num);
                    rs.deleteRow();
                }
            }

            Statement dropStmt = c.createStatement();
View Full Code Here

Examples of java.sql.ResultSet.deleteRow()

            rs.absolute(10);
            rs.updateString(2, "UPDATE10");
            rs.updateRow();
            rs.absolute(11);
            rs.deleteRow();
            rs.moveToInsertRow();
            rs.updateInt(1, 1011);
            rs.updateString(2, "INSERT1011");
            rs.updateString(3, "0101");
            rs.insertRow();
View Full Code Here

Examples of java.sql.ResultSet.deleteRow()

        assertEquals("Did not expect the resultset to be updated", oldValue, rs.getInt(2));
        assertTrue("Expected rs.rowDeleted() to be false", !rs.rowDeleted());
        assertTrue("Expected rs.rowUpdated() to be false", !rs.rowUpdated());
       
        rs.clearWarnings();
        rs.deleteRow();
        warn = rs.getWarnings();
        assertWarning(warn, CURSOR_OPERATION_CONFLICT);
        rs.relative(0);
        assertTrue("Expected rs.rowUpdated() to be false", !rs.rowUpdated());
        assertTrue("Expected rs.rowDeleted() to be false", !rs.rowDeleted());
View Full Code Here

Examples of java.sql.ResultSet.deleteRow()

        rs.updateInt(1, currentPosition + 1000);
        rs.next();
        assertEquals("CurrentPosition should be " + (currentPosition + 1),
                rs.getRow(), currentPosition + 1);
        // should be able to delete the row
        rs.deleteRow();

        // Test that it is possible to move using relative from insertRow
        currentPosition = rs.getRow();
        rs.moveToInsertRow();
        rs.updateInt(1, currentPosition + 1000);
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.