Package java.sql

Examples of java.sql.ResultSet.moveToInsertRow()


        rs.updateBoolean("I", true);
        rs.updateBoolean("C", true);
        rs.insertRow();

        // Test updateObject() with a java.lang.Boolean on various column types
        rs.moveToInsertRow();
        rs.updateObject("B", Boolean.FALSE); // Used to fail with client driver
        rs.updateObject("I", Boolean.FALSE);
        rs.updateObject("C", Boolean.FALSE);
        rs.insertRow();
View Full Code Here


        byte[] bytes = "abc".getBytes();

        // Test updateBytes()
        ResultSet rs = ps.executeQuery();
        rs.moveToInsertRow();
        try {
            rs.updateBytes(1, bytes);
            fail("updateBytes should fail");
        } catch (SQLException sqle) {
            assertSQLState(ILLEGAL_UPDATE, sqle);
View Full Code Here

        }
        rs.close();

        // setObject() should also fail when the argument is a byte array
        rs = ps.executeQuery();
        rs.moveToInsertRow();
        try {
            rs.updateObject(1, bytes);
            fail("updateObject should fail");
        } catch (SQLException sqle) {
            assertSQLState(ILLEGAL_UPDATE, sqle);
View Full Code Here

    //DERBY-2966
    //Moving to insert row in a territory based db should not cause exception
    ps = conn.prepareStatement("SELECT * FROM CUSTOMER FOR UPDATE",
        ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_UPDATABLE);
    rs = ps.executeQuery();
    rs.moveToInsertRow();
    rs.close();
    ps.close();
   
    //DERBY-2973
    //alter table modify column should not give an error
View Full Code Here

        s.execute("create table derby5042(b boolean, i int, c char(10))");

        ResultSet rs = s.executeQuery("select * from derby5042");

        // Test updateBoolean() on various column types
        rs.moveToInsertRow();
        rs.updateBoolean("B", true); // Used to fail with client driver
        rs.updateBoolean("I", true);
        rs.updateBoolean("C", true);
        rs.insertRow();

View Full Code Here

        rs.next();
        rs.next();
        assertTrue(rs.isAfterLast());

        // Insert a row
        rs.moveToInsertRow();
        rs.updateInt(1,42);
        rs.updateInt(2,42);
        rs.insertRow();

        // Delete a row
View Full Code Here

                                          ResultSet.CONCUR_UPDATABLE);
        ResultSet rs = s.executeQuery("select * from t1");
       
        checkDetectabilityCallsOutsideRow(rs, "before positioning");

        rs.moveToInsertRow();
        checkDetectabilityCallsOutsideRow(rs,
                                          "on insertRow before positioning");

        rs.next();
        rs.moveToInsertRow();
View Full Code Here

        rs.moveToInsertRow();
        checkDetectabilityCallsOutsideRow(rs,
                                          "on insertRow before positioning");

        rs.next();
        rs.moveToInsertRow();
        checkDetectabilityCallsOutsideRow(rs, "on insertRow");
        rs.moveToCurrentRow(); // needed until to DERBY-1322 is fixed

        rs.beforeFirst();
        checkDetectabilityCallsOutsideRow(rs, "on beforeFirst row");
View Full Code Here

                                ResultSet.CONCUR_UPDATABLE);
        rs = s.executeQuery("select * from t1");

        checkDetectabilityCallsOutsideRow(rs, "before FO positioning");

        rs.moveToInsertRow();
        checkDetectabilityCallsOutsideRow(rs,
                                          "on insertRow before FO positioning");

        rs.next();
        rs.moveToInsertRow();
View Full Code Here

        rs.moveToInsertRow();
        checkDetectabilityCallsOutsideRow(rs,
                                          "on insertRow before FO positioning");

        rs.next();
        rs.moveToInsertRow();
        checkDetectabilityCallsOutsideRow(rs, "on FO insertRow");

        rs.next();
        rs.updateInt(2, 666);
        rs.updateRow();
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.