Package java.sql

Examples of java.sql.Statement.executeUpdate()


    if (DBBind.exists(oConn, DB.k_x_activity_audience, "U")) {
      oDlte.executeUpdate("UPDATE "+DB.k_x_activity_audience+" SET "+DB.gu_address+"=NULL WHERE "+DB.gu_address+"='"+getString(DB.gu_address)+"'");
    }

    if (DBBind.exists(oConn, DB.k_sms_audit, "U")) {
      oDlte.executeUpdate("UPDATE "+DB.k_sms_audit+" SET "+DB.gu_address+"=NULL WHERE "+DB.gu_address+"='"+getString(DB.gu_address)+"'");
    }

  // ************

  // ************
 
View Full Code Here


  // ************
    // New for v4.0

    if (DebugFile.trace) DebugFile.writeln("Statement.executeUpdate(UPDATE " + DB.k_meetings + " SET " + DB.gu_address + "=NULL WHERE " + DB.gu_address + "='" + getStringNull(DB.gu_address,"null") + "')");
    oDlte.executeUpdate("UPDATE " + DB.k_meetings + " SET " + DB.gu_address + "=NULL WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "'");

  // ************
 
    if (DBBind.exists(oConn, DB.k_welcome_packs, "U")) {
      if (DebugFile.trace) DebugFile.writeln("Statement.executeUpdate(DELETE FROM " + DB.k_welcome_packs_changelog + " WHERE " + DB.gu_pack + " IN (SELECT " + DB.gu_pack +  " FROM " + DB.k_welcome_packs + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "'))");
View Full Code Here

  // ************
 
    if (DBBind.exists(oConn, DB.k_welcome_packs, "U")) {
      if (DebugFile.trace) DebugFile.writeln("Statement.executeUpdate(DELETE FROM " + DB.k_welcome_packs_changelog + " WHERE " + DB.gu_pack + " IN (SELECT " + DB.gu_pack +  " FROM " + DB.k_welcome_packs + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "'))");

      oDlte.executeUpdate("DELETE FROM " + DB.k_welcome_packs_changelog + " WHERE " + DB.gu_pack + " IN (SELECT " + DB.gu_pack +  " FROM " + DB.k_welcome_packs + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "')");

      if (DebugFile.trace) DebugFile.writeln("Statement.executeUpdate(DELETE FROM " + DB.k_welcome_packs + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "')");

      oDlte.executeUpdate("DELETE FROM " + DB.k_welcome_packs + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "'");
    }
View Full Code Here

      oDlte.executeUpdate("DELETE FROM " + DB.k_welcome_packs_changelog + " WHERE " + DB.gu_pack + " IN (SELECT " + DB.gu_pack +  " FROM " + DB.k_welcome_packs + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "')");

      if (DebugFile.trace) DebugFile.writeln("Statement.executeUpdate(DELETE FROM " + DB.k_welcome_packs + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "')");

      oDlte.executeUpdate("DELETE FROM " + DB.k_welcome_packs + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "'");
    }

    if (DBBind.exists(oConn, DB.k_x_company_addr, "U")) {
      if (DebugFile.trace) DebugFile.writeln("Statement.executeUpdate(DELETE FROM " + DB.k_x_company_addr + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "')");
View Full Code Here

    }

    if (DBBind.exists(oConn, DB.k_x_company_addr, "U")) {
      if (DebugFile.trace) DebugFile.writeln("Statement.executeUpdate(DELETE FROM " + DB.k_x_company_addr + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "')");

      oDlte.executeUpdate("DELETE FROM " + DB.k_x_company_addr + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "'");
    }

    if (DBBind.exists(oConn, DB.k_x_contact_addr, "U")) {
      if (DebugFile.trace) DebugFile.writeln("Statement.executeUpdate(DELETE FROM " + DB.k_x_contact_addr + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "')");
View Full Code Here

    }

    if (DBBind.exists(oConn, DB.k_x_contact_addr, "U")) {
      if (DebugFile.trace) DebugFile.writeln("Statement.executeUpdate(DELETE FROM " + DB.k_x_contact_addr + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "')");

      oDlte.executeUpdate("DELETE FROM " + DB.k_x_contact_addr + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "'");
    }

    if (DebugFile.trace) DebugFile.writeln("Statement.executeUpdate(DELETE FROM " + DB.k_addresses + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "')");

    iAffected = oDlte.executeUpdate("DELETE FROM " + DB.k_addresses + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "'");
View Full Code Here

      oDlte.executeUpdate("DELETE FROM " + DB.k_x_contact_addr + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "'");
    }

    if (DebugFile.trace) DebugFile.writeln("Statement.executeUpdate(DELETE FROM " + DB.k_addresses + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "')");

    iAffected = oDlte.executeUpdate("DELETE FROM " + DB.k_addresses + " WHERE " + DB.gu_address + "='" + getString(DB.gu_address) + "'");

    if (DebugFile.trace) {
      DebugFile.decIdent();
      DebugFile.writeln("End Address.delete() : " + String.valueOf((iAffected>0 ? true : false)));
    }
View Full Code Here

                              }
                              else {
                                 if (this.recreateTables) {
                                    log.warning("store: the table '" + completeTableName + "' exists already. 'replication.overwriteTables' is set to 'true': will drop the table and recreate it");
                                    Statement st = conn.createStatement();
                                    st.executeUpdate("DROP TABLE " + completeTableName);
                                    st.close();
                                 }
                                 else {
                                    log.warning("store: the table '" + completeTableName + "' exists already. 'replication.overwriteTables' is set to 'true' and 'replication.recreateTables' is set to false. Will only delete contents of table but keep the old structure");
                                    invokeCreate = false;
View Full Code Here

                              sql = "DELETE FROM " + completeTableName;
                              log.info("CLEANING UP TABLE '" + completeTableName + "'");
                           }
                           Statement st = conn.createStatement();
                           try {
                              st.executeUpdate(sql);
                           }
                           finally {
                              st.close();
                           }
                           if (this.prePostStatement != null) {
View Full Code Here

                           if (schema != null && schema.length() > 1)
                              completeTableName = schema + "." + table;
                           String sql = "DROP TABLE " + completeTableName;
                           Statement st = conn.createStatement();
                           try {
                              st.executeUpdate(sql);
                           }
                           catch (SQLException e) {
                              // this is currently only working on oracle: TODO make it work for other DB too.
                              if (e.getMessage().indexOf("does not exist") > -1)
                                 log.warning("table '" + completeTableName + "' was not found and could therefore not be dropped. Continuing anyway");
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.