Examples of executeUpdate()


Examples of de.danet.an.util.UniversalPrepStmt.executeUpdate()

            if (hasParameters()) {
                PreparedStatement ps
        = new UniversalPrepStmt (conn, sqlStatement);
                statement = ps;
                setParameters(ps);
                result = ps.executeUpdate();
            } else {
                statement = conn.createStatement();
                result = statement.executeUpdate(sqlStatement);
            }
            if (var != null) {
View Full Code Here

Examples of de.mhus.lib.sql.DbStatement.executeUpdate()

      DbConnection con = pool.getConnection();
     
      // create database
      DbStatement sthc = con.getStatement("create");
      try {
        sthc.executeUpdate(null);
          con.commit();
      } catch (Exception e) {e.printStackTrace();}
     
      DbStatement sth = con.getStatement("select");
      try {
View Full Code Here

Examples of ejp.DatabaseManager.executeUpdate()

        DatabaseManager dbm = DatabaseManager.getDatabaseManager("contacts", 5,
                                                                 "org.hsqldb.jdbcDriver",
                                                                 "jdbc:hsqldb:mem:contacts",
                                                                 "sa", "");
       
        dbm.executeUpdate("CREATE MEMORY TABLE simple_storage (" +
                          "account varchar(40) NOT NULL," +
                          "container varchar(40) NOT NULL," +
                          "object varchar(40) NOT NULL," +
                          "data longvarbinary NOT NULL," +
                          "PRIMARY KEY (account, container, object))");
View Full Code Here

Examples of java.sql.CallableStatement.executeUpdate()

        call.execute();
        rs = call.getResultSet();
        rs.next();
        assertEquals(10, rs.getInt(1));

        call.executeUpdate();
        rs = call.getResultSet();
        rs.next();
        assertEquals(10, rs.getInt(1));

    }
View Full Code Here

Examples of java.sql.PreparedStatement.executeUpdate()

        for (int i = 0; i < len; i++) {
            if (i % 1000 == 0) {
                // trace("[" + i + "/" + len + "] KB: " + MemoryUtils.getMemoryUsed());
            }
            prep.setInt(1, i);
            prep.executeUpdate();
        }
        int base = Utils.getMemoryUsed();
        stat.execute("create index idx_test_id on test(id)");
        System.gc();
        System.gc();
View Full Code Here

Examples of java.sql.Statement.executeUpdate()

    int nb = 0;
    try {
      // Creating a statement lets us issue commands against the connection.
      Statement s = conn.createStatement();
      //
      nb = s.executeUpdate("DELETE FROM JoramDB WHERE name='" + fname + "'");
    } catch (SQLException sqle) {
      if (sqle instanceof com.mysql.jdbc.CommunicationsException && !reconnectLoop)
      {
          logger.log(BasicLevel.WARN, "Database reconnection problem at delete, Reconnecting");
          reconnection();
View Full Code Here

Examples of java.sql.Statement.executeUpdate()

        rs = stat.executeQuery("SELECT COUNT(*) FROM LINK_TEST WHERE NAME='Link Test'");
        rs.next();
        assertEquals(1, rs.getInt(1));

        int uc = stat.executeUpdate("DELETE FROM LINK_TEST WHERE ID=3");
        assertEquals(1, uc);

        rs = stat.executeQuery("SELECT COUNT(*) FROM LINK_TEST");
        rs.next();
        assertEquals(3, rs.getInt(1));
View Full Code Here

Examples of java.sql.Statement.executeUpdate()

      statement = m_Connection.createStatement(
    ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
    else
      statement = m_Connection.createStatement(
    getSupportedCursorScrollType(), ResultSet.CONCUR_READ_ONLY);
    int result = statement.executeUpdate(query);
    statement.close();
   
    return result;
  }
View Full Code Here

Examples of java.sql.Statement.executeUpdate()

         }
         else {
            Statement sqlStatement = conn.createStatement();
            try
            {
               sqlStatement.executeUpdate(statement);
            }
            finally
            {
               sqlStatement.close();
            }
View Full Code Here

Examples of javax.persistence.Query.executeUpdate()

  }
 
  public int executeNative (String query, Object... pars) {
    Query q = this.getStorage().createNativeQuery(query);
    for (int i=0; i<pars.length; i++) q.setParameter(i, pars[i]);
    return q.executeUpdate();
  }
 
  public List getNativeResults (String query) { return this.getNativeResults(query, new Object[0]); }
 
  public List getNativeResults (String query, Object... pars) {
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.