Package java.sql

Examples of java.sql.ResultSet.relative()


          
           rs.relative(11);
           assertEquals(13, rs.getInt(1));
           assertEquals(12, rs.getRow());
          
           rs.relative(1);
           assertNoCurrentRow(rs);
           rs.last();
           assertEquals(13, rs.getInt(1));
           assertEquals(12,rs.getRow());
          
View Full Code Here


           assertNoCurrentRow(rs);
           rs.last();
           assertEquals(13, rs.getInt(1));
           assertEquals(12,rs.getRow());
          
           rs.relative(-11);
           assertEquals(2,rs.getInt(1));
           assertEquals(1,rs.getRow());
           rs.close();
           ps_c1.close();
           conn.commit();
View Full Code Here

            assertEquals(1,rs.getInt(1));
            rs.last();
            assertEquals(5,rs.getInt(1));
            rs.absolute(2);
            assertEquals(2, rs.getInt(1));
            rs.relative(2);
            assertEquals(4,rs.getInt(1));
            rs.close();
            // since JCC gets 64 results and then scrolls within them
            // lets try each p ositioning command as the first command for the cursor.
            rs = ps_c1.executeQuery();
View Full Code Here

                assertSQLState("XJ061",se);
            else
                assertSQLState("XJ125",se);
        }
        try {
            rs.relative(1);
            fail("relative() not allowed on forward only result set");
        } catch(SQLException se) {
            if (usingEmbedded())
                assertSQLState("XJ061",se);
            else
View Full Code Here

            rs.absolute(0);
            assertNoCurrentRow(rs);
            rs.close();
           
            rs = ps_c1.executeQuery();
            rs.relative(0);
            assertNoCurrentRow(rs);
            rs.close();
            rs = ps_c1.executeQuery();
           
            rs.relative(2);
View Full Code Here

            rs.relative(0);
            assertNoCurrentRow(rs);
            rs.close();
            rs = ps_c1.executeQuery();
           
            rs.relative(2);
            assertEquals("c",rs.getString(1).trim());
            assertEquals(3, rs.getInt(2));
            rs.close();
            rs = ps_c1.executeQuery();
            rs.first();
View Full Code Here

       
        final int newVal = rs.getInt(1) + 11;
        final int newSize = rs.getInt(2) / 2;
        testUpdateBlobWithPositionedUpdate(rs, newVal, newSize);

        rs.relative(0); // Necessary after a positioned update
       
        println("Verify updated blob using result set");
        verifyBlob(newVal, newSize, rs.getBlob(3));
       
        rs.close();
View Full Code Here

       
        final int newVal = BLOBDataModelSetup.bigVal * 2;
        final int newSize = BLOBDataModelSetup.bigSize / 2;
        testUpdateBlobWithPositionedUpdate(rs, newVal, newSize);

        rs.relative(0); // Necessary after a positioned update
       
        println("Verify updated blob using result set");
        verifyBlob(newVal, newSize, rs.getBlob("DATA"));
       
        rs.close();
View Full Code Here

       
        final int newVal = rs.getInt(1) + 11;
        final int newSize = rs.getInt(2) / 2;
        testUpdateBlobWithPositionedUpdate(rs, newVal, newSize);

        rs.relative(0); // Necessary after a positioned update
       
        println("Verify updated blob using result set");
        verifyBlob(newVal, newSize, rs.getBlob(3));
       
        rs.close();
View Full Code Here

       
        final int newVal = BLOBDataModelSetup.bigVal * 2;
        final int newSize = BLOBDataModelSetup.bigSize / 2;
        testUpdateBlobWithPositionedUpdate(rs, newVal, newSize);

        rs.relative(0); // Necessary after a positioned update
       
        println("Verify updated blob using result set");
        verifyBlob(newVal, newSize, rs.getBlob("DATA"));
       
        rs.close();
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.