Examples of updateRow()


Examples of java.sql.ResultSet.updateRow()

        assertEquals("Expected one row to be updated", 1,
                     ps.executeUpdate());
        rs.updateInt(1, primaryKey*10);
        rs.updateInt(2, -555);
        rs.updateInt(3, -777);
        rs.updateRow();
        rs.first();
        rs.last();
        for (int i=0; i<10; i++) {
            rs.first();
            rs.last();
View Full Code Here

Examples of java.sql.ResultSet.updateRow()

            rs.next();
            rs.previous();
            rs.updateInt(1, primaryKey*10 +i);
            rs.updateInt(2, (-555 -i));
            rs.updateInt(3, (-777 -i));
            rs.updateRow();
        }
        rs.close();
        s.close();
    }
   
View Full Code Here

Examples of java.sql.ResultSet.updateRow()

        rs.next();
        int newKey = 0;
        while(rs.previous()) {
            // Update the secondary key of all rows
            rs.updateInt(2, newKey--);
            rs.updateRow();
        }
        PreparedStatement ps = prepareStatement
            ("select * from t1 where a=?");
        for (int i=0; i<recordCount; i++) {
            int key = -i;
View Full Code Here

Examples of java.sql.ResultSet.updateRow()

        assertEquals("Expected one row to be updated", 1,
                     ps.executeUpdate());
       
        rs.updateInt(1, -555);
        rs.updateInt(3, -777);
        rs.updateRow();
       
        PreparedStatement ps2 =
            prepareStatement("select * from t1 where a=?");
        ps2.setInt(1, -indexedKey);
        ResultSet rs2 = ps2.executeQuery();
View Full Code Here

Examples of java.sql.ResultSet.updateRow()

                                           ResultSet.CONCUR_UPDATABLE);
        s.setCursorName(getNextCursorName());
        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());
View Full Code Here

Examples of java.sql.ResultSet.updateRow()

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

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

        rs.next();
        rs.deleteRow();
        checkDetectabilityCallsOutsideRow(rs, "after FO deleteRow");
View Full Code Here

Examples of java.sql.ResultSet.updateRow()

            Blob blob = res.getBlob(1);
            OutputStream os = blob.setBinaryStream(1);
            copy(is, os);
            os.close();
            res.updateBlob(1, blob);
            res.updateRow();

        } catch (IOException ioe) {
            throw new StoreException(ioe);
        } finally {
            if (res != null)
View Full Code Here

Examples of java.sql.ResultSet.updateRow()

            Clob clob = res.getClob(1);
            Writer writer = clob.setCharacterStream(1);
            copy(reader, writer);
            writer.close();
            res.updateClob(1, clob);
            res.updateRow();

        } catch (IOException ioe) {
            throw new StoreException(ioe);
        } finally {
            if (res != null)
View Full Code Here

Examples of java.sql.ResultSet.updateRow()

                        if (Strings.isBlank(strategyId)) {
                            resultSet.updateString(Columns.STRATEGY_ID, UsernameActivationStrategy.ID);
                        }

                        // perform the update
                        resultSet.updateRow();

                    }

                }
View Full Code Here

Examples of javax.sql.rowset.CachedRowSet.updateRow()

        crset.absolute(3);

        CachedRowSet crsetCopy = crset.createCopy();

        crsetCopy.updateString(2, "copyTest3");
        crsetCopy.updateRow();
        crsetCopy.acceptChanges();

        assertEquals("copyTest3", crsetCopy.getString(2));

        assertEquals("test3", crset.getString(2));
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.