Examples of updateLong()


Examples of java.sql.ResultSet.updateLong()

        // change the cursor name(case sensitive name) with setCursorName and
        // then try to updateRow
        stmt.setCursorName("CURSORNOUPDATe");
        ResultSet rs = stmt.executeQuery("SELECT * FROM t1 FOR UPDATE of c1");
        assertTrue("FAIL - row not found", rs.next());
        rs.updateLong(1, 123);
        try {
            stmt.setCursorName("CURSORNOUPDATE1");
            assertTrue("FAIL - expected exception in network client",
                    usingEmbedded());
        } catch (SQLException e) {
View Full Code Here

Examples of java.sql.ResultSet.updateLong()

       
        rs = stmt.executeQuery("SELECT * FROM table0WithTriggers");
        assertTrue("FAIL - row not found", rs.next());
        assertEquals("FAIL - wrong value for column c1", 1, rs.getInt(1));
        // now try to update row and make sure that trigger got fired
        rs.updateLong(1,123);
        rs.updateRow();
        rs.close();
       
        // Verify that update trigger got fired by verifying the row count to
        // be 1 in updateTriggerInsertIntoThisTable
View Full Code Here

Examples of java.sql.ResultSet.updateLong()

                        + entity.getName());
            }

            long nextId = rs.getLong(1);

            rs.updateLong(1, nextId + pkCacheSize);
            rs.updateRow();

            if (rs.next()) {
                throw new CayenneException("More than one PK record for table: "
                        + entity.getName());
View Full Code Here

Examples of java.sql.ResultSet.updateLong()

        while (rs1.next()) {
            if (rs1.getInt(1) == updateRowId) {
                rs1.updateClob(4, value);
                rs1.updateInt(1, updateIdVal);
                rs1.updateInt(2, 0);
                rs1.updateLong(3, dlen);
                rs1.updateRow();
                break;
            }
        }
View Full Code Here

Examples of java.sql.ResultSet.updateLong()

                                + entity.getName());
                    }
       
                    long nextId = rs.getLong(1);
       
                    rs.updateLong(1, nextId + pkCacheSize);
                    rs.updateRow();
       
                    if (rs.next()) {
                        throw new CayenneException("More than one PK record for table: "
                                + entity.getName());
View Full Code Here

Examples of java.sql.ResultSet.updateLong()

                ResultSet.CONCUR_UPDATABLE);
        ResultSet rs = s.executeQuery(SELECT_STMT);
        rs.next();

        for (int i = 1; i <= COLUMNS; i++) {
            rs.updateLong(i, 2L);
            assertEquals("Expected rs.getLong(" + i +
                         ") to match updated value", 2L, rs.getLong(i));
        }
        rs.updateRow();
        rs.close();
View Full Code Here

Examples of java.sql.ResultSet.updateLong()

                ResultSet.CONCUR_UPDATABLE);
        ResultSet rs = s.executeQuery(SELECT_STMT);
        rs.next();

        for (int i = 1; i <= COLUMNS; i++) {
            rs.updateLong(i, 2L);
            assertEquals("Expected rs.getLong(" + i +
                         ") to match updated value", 2L, rs.getLong(i));
        }
        rs.updateRow();
        rs.close();
View Full Code Here

Examples of java.sql.ResultSet.updateLong()

        while (rs1.next()) {
            if (rs1.getInt(1) == updateRowId) {
                rs1.updateClob(4, value);
                rs1.updateInt(1, updateIdVal);
                rs1.updateInt(2, 0);
                rs1.updateLong(3, dlen);
                rs1.updateRow();
                break;
            }
        }
View Full Code Here

Examples of java.sql.ResultSet.updateLong()

            rs.updateDate("F4", new java.sql.Date(System.currentTimeMillis()));
            rs.updateTime("F5", new java.sql.Time(System.currentTimeMillis()));
            rs.updateByte("F6", (byte) 6);
            rs.updateShort("F7", (short) 77);
            rs.updateInt("F8", 77);
            rs.updateLong("F9", 99);
            rs.updateBigDecimal("F10", new BigDecimal("10"));
            rs.updateTimestamp("F11", new java.sql.Timestamp(System.currentTimeMillis()));
            rs.updateBytes("F12", new byte[300]);
            rs.updateBinaryStream("F12", null);
            rs.updateBinaryStream("F12", null, 0);
View Full Code Here

Examples of java.sql.ResultSet.updateLong()

            rs.updateDate(4, new java.sql.Date(System.currentTimeMillis()));
            rs.updateTime(5, new java.sql.Time(System.currentTimeMillis()));
            rs.updateByte(6, (byte) 6);
            rs.updateShort(7, (short) 77);
            rs.updateInt(8, 77);
            rs.updateLong(9, 99);
            rs.updateBigDecimal(10, new BigDecimal("10"));
            rs.updateTimestamp(11, new java.sql.Timestamp(System.currentTimeMillis()));
            rs.updateBytes(12, new byte[300]);
            rs.updateBinaryStream(12, null);
            rs.updateBinaryStream(12, null, 0);
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.