Examples of absolute()


Examples of java.sql.ResultSet.absolute()

                }
                if (!rs.isAfterLast()) {
                    System.out.println("isAfterLast should be true");
                }
                rs.absolute(rows/2);
                if (rs.absolute(rows + 1)) {
                    System.out.println("absolute(" + (rows + 1) + ") should return false, position outside of the resultSet");
                    System.out.println("Current row: " + rs.getInt(1));
                }
                if (!rs.isAfterLast()) {
                    System.out.println("isAfterLast should be true");
View Full Code Here

Examples of java.sql.ResultSet.absolute()

                    System.out.println("Current row: " + rs.getInt(1));
                }
                if (!rs.isAfterLast()) {
                    System.out.println("isAfterLast should be true");
                }
                rs.absolute(rows/2);
                if (rs.absolute((-1) * (rows + 1))) {
                    System.out.println("absolute(" + (((-1) * (rows + 1))) + ") should return false, position outside of the resultSet");
                    System.out.println("Current row: " + rs.getInt(1));
                }
                if (!rs.isBeforeFirst()) {
View Full Code Here

Examples of java.sql.ResultSet.absolute()

                }
                if (!rs.isAfterLast()) {
                    System.out.println("isAfterLast should be true");
                }
                rs.absolute(rows/2);
                if (rs.absolute((-1) * (rows + 1))) {
                    System.out.println("absolute(" + (((-1) * (rows + 1))) + ") should return false, position outside of the resultSet");
                    System.out.println("Current row: " + rs.getInt(1));
                }
                if (!rs.isBeforeFirst()) {
                    System.out.println("isBeforeFirst should be true");
View Full Code Here

Examples of java.sql.ResultSet.absolute()

                            System.out.println(sqle.getMessage());
                        }
    }
    try
    {
      rs.absolute(1);
      // Should never get here
      System.out.println("absolute() expected to fail");
      passed = false;
    }
    catch (SQLException sqle)
View Full Code Here

Examples of java.sql.ResultSet.absolute()

        // Test that it is possible to move using absolute from insertRow
        currentPosition = rs.getRow();
        rs.moveToInsertRow();
        rs.updateInt(1, currentPosition + 1000);
        rs.absolute(6);
        assertEquals("CurrentPosition should be 6", rs.getRow(), 6);
        // should be able to delete the row
        rs.deleteRow();

        // Test that it is possible to move to previous row from insertRow
View Full Code Here

Examples of java.sql.ResultSet.absolute()

        if (resultSetType==ResultSet.TYPE_FORWARD_ONLY) {
            for (int i = 0; i < recordToUpdate; i++) {
                rs.next();
            }
        } else {
            rs.absolute(recordToUpdate);
        }
       
        commit();
       
        PreparedStatement ps =
View Full Code Here

Examples of java.sql.ResultSet.absolute()

    {
        Statement s = createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
                                          ResultSet.CONCUR_UPDATABLE);
        s.setCursorName(getNextCursorName());
        ResultSet rs = s.executeQuery("select * from t1");
        rs.absolute(5);
        final int oldCol2 = rs.getInt(2);
        final int newCol2 = -2222;
        final int oldCol3 = rs.getInt(3);
        final int newCol3 = -3333;
               
View Full Code Here

Examples of java.sql.ResultSet.absolute()

    {
        Statement s = createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE,
                                          ResultSet.CONCUR_UPDATABLE);
        s.setCursorName(getNextCursorName());
        ResultSet rs = s.executeQuery("select * from t1");
        rs.absolute(5);
        final int oldCol2 = rs.getInt(2);
        final int oldCol3 = rs.getInt(3);
       
        rs.updateNull(2);
        assertEquals("Expected the resultset to be updated after updateNull",
View Full Code Here

Examples of java.sql.ResultSet.absolute()

        // call positioning methods
        rs.next();
        rs.next();
        rs.previous();
        rs.relative(1);
        rs.absolute(3);
        rs.relative(-1);
        rs.first();
        rs.last();
        rs.beforeFirst();
        rs.afterLast();
View Full Code Here

Examples of java.sql.ResultSet.absolute()

        checkContentsBeforeAndAfterUpdatingBlob(rs);
        rs.next();
        checkContentsBeforeAndAfterUpdatingBlob(rs);
        rs.relative(3);
        checkContentsBeforeAndAfterUpdatingBlob(rs);
        rs.absolute(7);
        checkContentsBeforeAndAfterUpdatingBlob(rs);
        rs.previous();
        checkContentsBeforeAndAfterUpdatingBlob(rs);
        rs.last();
        checkContentsBeforeAndAfterUpdatingBlob(rs);
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.