Package java.sql

Examples of java.sql.ResultSet.updateInt()


      oSnxt.setObject(1, sGuWorkArea, Types.CHAR);
      oRnxt = oSnxt.executeQuery();
      bNext = oRnxt.next();
      if (bNext) {
        iNextInvoic = oRnxt.getInt(1);
        oRnxt.updateInt(DB.pg_invoice, ++iNextInvoic);
        oRnxt.updateRow();
      }
      oRnxt.close();
      oRnxt=null;
      oSnxt.close();
View Full Code Here


        }
        rs.first(); // Go to first tuple
        println("T1: Read first Tuple:(" + rs.getInt(1) + "," +
                rs.getInt(2) + "," +
                rs.getInt(3) + ")");
        rs.updateInt(2, 3);
        println("T1: updateInt(2, 3);");
        rs.updateRow();
        println("T1: updateRow()");
        rs.last(); // Go to last tuple
        println("T1: Read last Tuple:(" + rs.getInt(1) + "," +
View Full Code Here

        println("T1: updateRow()");
        rs.last(); // Go to last tuple
        println("T1: Read last Tuple:(" + rs.getInt(1) + "," +
                rs.getInt(2) + "," +
                rs.getInt(3) + ")");
        rs.updateInt(2, 3);
        println("T1: updateInt(2, 3);");
        rs.updateRow();
        println("T1: updateRow()");
        commit();
        println("T1: commit");
View Full Code Here

            throw e;
        }
        println("T1: read previous tuple");
        rs.previous(); // Go back to first tuple
        println("T1: id=" + rs.getInt(1));
        rs.updateInt(2, 3);
        println("T1: updateInt(2, 3);");
        rs.updateRow();
        println("T1: updated column 2, to value=3");
        println("T1: commit");
        commit();
View Full Code Here

        println("T1: Read previous Tuple:(" + rs.getInt(1) + "," +
                rs.getInt(2) + "," +
                rs.getInt(3) + ")");
       
        println("T1: id=" + rs.getInt(1));
        rs.updateInt(2, 3);
        rs.updateRow();
        println("T1: updated column 2, to value=3");
        println("T1: commit");
        commit();
        rs = s.executeQuery("select * from t1");
View Full Code Here

        }
        rs.previous(); // Go back to first tuple
        println("T1: Read previous Tuple:(" + rs.getInt(1) + "," +
                rs.getInt(2) + "," +
                rs.getInt(3) + ")");
        rs.updateInt(2, 3);
        rs.updateRow();
        println("T1: updated column 2, to value=3");
        commit();
        println("T1: commit");
        rs = s.executeQuery("select * from t1");
View Full Code Here

        }
        rs.previous(); // Go back to first tuple
        println("T1: Read previous Tuple:(" + rs.getInt(1) + "," +
                rs.getInt(2) + "," +
                rs.getInt(3) + ")");
        rs.updateInt(3, 9999);
        rs.updateRow();
        println("T1: updated column 3, to value=9999");
        commit();
        println("T1: commit");
        rs = s.executeQuery("select * from t1");
View Full Code Here

        }
        rs.first(); // Go to first tuple
        println("T1: Read first Tuple:(" + rs.getInt(1) + "," +
                rs.getInt(2) + "," +
                rs.getInt(3) + ")");
        rs.updateInt(2, 3);
        println("T1: updateInt(2, 3);");
        rs.updateRow();       
        println("T1: updateRow()");
        rs.last(); // Go to last tuple
        println("T1: Read last Tuple:(" + rs.getInt(1) + "," +
View Full Code Here

        println("T1: updateRow()");
        rs.last(); // Go to last tuple
        println("T1: Read last Tuple:(" + rs.getInt(1) + "," +
                rs.getInt(2) + "," +
                rs.getInt(3) + ")");
        rs.updateInt(2, 3);
        println("T1: updateInt(2, 3);");
        rs.updateRow();
        println("T1: updateRow()");
        commit();
        println("T1: commit");
View Full Code Here

        rs.next();
        createStatement().executeUpdate("delete from t1 where id=" +
                                            rs.getString("ID"));
        final int newValue = -3333;
        final int oldValue = rs.getInt(2);
        rs.updateInt(2, newValue);
        rs.updateRow();
       
        SQLWarning warn = rs.getWarnings();
        assertWarning(warn, CURSOR_OPERATION_CONFLICT);
        assertEquals("Did not expect the resultset to be updated", oldValue, rs.getInt(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.