Package java.sql

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


        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

        updateBlobWithUpdateBinaryStream(rs);
        rs.next();
        updateBlobWithUpdateBinaryStream(rs);
        rs.relative(3);
        updateBlobWithUpdateBinaryStream(rs);
        rs.absolute(7);
        updateBlobWithUpdateBinaryStream(rs);
        rs.previous();
        updateBlobWithUpdateBinaryStream(rs);
        rs.last();
        updateBlobWithUpdateBinaryStream(rs);
View Full Code Here

        assertTrue(!rs.next());
        assertTrue(!rs.previous());
        assertTrue(!rs.first());
        assertTrue(!rs.last());
        assertEquals(0, rs.getRow());
        assertTrue(!rs.absolute(1));
        assertTrue(!rs.relative(1));
        assertTrue(!rs.isBeforeFirst());
        assertTrue(!rs.isAfterLast());
        assertTrue(!rs.isFirst());
        assertTrue(!rs.isLast());
View Full Code Here

        assertTrue(!rs.isBeforeFirst());
        assertTrue(!rs.isAfterLast());
        assertTrue(rs.isFirst());
        assertTrue(rs.isLast());

        assertTrue(rs.absolute(1));

        assertTrue(!rs.isBeforeFirst());
        assertTrue(!rs.isAfterLast());
        assertTrue(rs.isFirst());
        assertTrue(rs.isLast());
View Full Code Here

        assertTrue(!rs.isBeforeFirst());
        assertTrue(!rs.isAfterLast());
        assertTrue(rs.isFirst());
        assertTrue(rs.isLast());

        assertTrue(!rs.absolute(0));

        assertTrue(rs.isBeforeFirst());
        assertTrue(!rs.isAfterLast());
        assertTrue(!rs.isFirst());
        assertTrue(!rs.isLast());
View Full Code Here

        assertTrue(rs.isBeforeFirst());
        assertTrue(!rs.isAfterLast());
        assertTrue(!rs.isFirst());
        assertTrue(!rs.isLast());

        assertTrue(!rs.absolute(2));

        assertTrue(!rs.isBeforeFirst());
        assertTrue(rs.isAfterLast());
        assertTrue(!rs.isFirst());
        assertTrue(!rs.isLast());
View Full Code Here

        Statement stmt = con.createStatement(ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
        ResultSet rs = stmt.executeQuery("SELECT * FROM testnumeric");

        try
        {
            rs.absolute(1);
            fail("absolute() on a TYPE_FORWARD_ONLY resultset did not throw an exception");
        }
        catch (SQLException e)
        {
        }
View Full Code Here

            catch (SQLException e) { }
        try { rs.getType(); fail("Expected SQLException"); }
            catch (SQLException e) { }
        try { rs.wasNull(); fail("Expected SQLException"); }
            catch (SQLException e) { }
        try { rs.absolute(3); fail("Expected SQLException"); }
            catch (SQLException e) { }
        try { rs.isBeforeFirst(); fail("Expected SQLException"); }
            catch (SQLException e) { }
        try { rs.setFetchSize(10); fail("Expected SQLException"); }
            catch (SQLException e) { }
View Full Code Here

    public void testAbsolute() throws SQLException
    {
        Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_READ_ONLY);
        ResultSet rs = stmt.executeQuery("SELECT * FROM testrs");

        assertTrue(!rs.absolute(0));
        assertEquals(0, rs.getRow());

        assertTrue(rs.absolute( -1));
        assertEquals(6, rs.getRow());

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.