Examples of updateString()


Examples of java.sql.ResultSet.updateString()

        // 'not set' values are set to null
        rs.insertRow();

        rs.moveToInsertRow();
        rs.updateInt(1, 1);
        rs.updateString(2, null);
        rs.updateBigDecimal(3, null);
        rs.updateBoolean(4, false);
        rs.updateByte(5, (byte) 0);
        rs.updateBytes(6, null);
        rs.updateDate(7, null);
View Full Code Here

Examples of java.sql.ResultSet.updateString()

        rs.updateBinaryStream(16, new ByteArrayInputStream(new byte[] { (byte) 0xff, 0x00 }), 0);
        rs.insertRow();

        rs.moveToInsertRow();
        rs.updateInt("ID", 2);
        rs.updateString("NAME", "+");
        rs.updateBigDecimal("DEC", new BigDecimal("1.2"));
        rs.updateBoolean("BOO", true);
        rs.updateByte("BYE", (byte) 0xff);
        rs.updateBytes("BIN", new byte[] { 0x00, (byte) 0xff });
        rs.updateDate("D", Date.valueOf("2005-09-21"));
View Full Code Here

Examples of java.sql.ResultSet.updateString()

        ResultSet rs = stat.executeQuery("SELECT * FROM TEST ORDER BY ID");
        rs.next();
        rs.updateInt(1, 10);
        rs.updateRow();
        rs.next();
        rs.updateString(2, "Welt");
        rs.updateRow();
        rs.beforeFirst();
        rs.next();
        assertEquals(10, rs.getInt(1));
        assertEquals("Hello", rs.getString(2));
View Full Code Here

Examples of java.sql.ResultSet.updateString()

                Statement s2 = c2.createStatement();
                s2.execute("UPDATE TEST SET NAME = NAME || '+' WHERE ID = " + rs.getInt(1));
                if (id % 4 == 0) {
                    rs.refreshRow();
                }
                rs.updateString(2, "Updated " + rs.getString(2));
                rs.updateRow();
            } else {
                rs.deleteRow();
            }
            rs.moveToInsertRow();
View Full Code Here

Examples of java.sql.ResultSet.updateString()

                rs.updateRow();
            } else {
                rs.deleteRow();
            }
            rs.moveToInsertRow();
            rs.updateString(2, "Inserted " + j);
            rs.updateInt(1, j);
            j += 2;
            rs.insertRow();
        }
        rs = stat.executeQuery("SELECT * FROM TEST ORDER BY ID");
View Full Code Here

Examples of java.sql.ResultSet.updateString()

    while (oRSet.next()) {
      sProductId = oRSet.getString(1);

      if (DebugFile.trace) DebugFile.writeln("ResultSet.updateString gu_product = " + sProductId + " to NULL");

      oRSet.updateString(1, null);

      if (DebugFile.trace) DebugFile.writeln("ResultSet.updateRow();");

      oRSet.updateRow();
View Full Code Here

Examples of java.sql.ResultSet.updateString()

                        // convert the user list to the new parameters format
                        Map<String, String> params = new HashMap<String, String>();
                        params.put(UsernameActivationStrategy.PARAM_USERS, users);
                        String paramData = serializer.serialize(params);
                        resultSet.updateString(Columns.STRATEGY_PARAMS, paramData);

                        // only overwrite strategy ID if it is not set yet
                        String strategyId = resultSet.getString(Columns.STRATEGY_ID);
                        if (Strings.isBlank(strategyId)) {
                            resultSet.updateString(Columns.STRATEGY_ID, UsernameActivationStrategy.ID);
View Full Code Here

Examples of java.sql.ResultSet.updateString()

                        resultSet.updateString(Columns.STRATEGY_PARAMS, paramData);

                        // only overwrite strategy ID if it is not set yet
                        String strategyId = resultSet.getString(Columns.STRATEGY_ID);
                        if (Strings.isBlank(strategyId)) {
                            resultSet.updateString(Columns.STRATEGY_ID, UsernameActivationStrategy.ID);
                        }

                        // perform the update
                        resultSet.updateRow();
View Full Code Here

Examples of java.sql.ResultSet.updateString()

    try {
      while (rs.next()) {
        int idx = 1;
        for (Object v : newVals) {
          if (v instanceof String)
            rs.updateString(idx++, (String) v);
          else if (v instanceof Boolean)
            rs.updateBoolean(idx++, (Boolean) v);
          else if (v instanceof Long)
            rs.updateLong(idx++, (Long) v);
          else
View Full Code Here

Examples of java.sql.ResultSet.updateString()

            rs.updateRow();
            rs.absolute(11);
            rs.deleteRow();
            rs.moveToInsertRow();
            rs.updateInt(1, 1011);
            rs.updateString(2, "INSERT1011");
            rs.updateString(3, "0101");
            rs.insertRow();
            rs.close();

            rs = st.executeQuery(s);
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.