Package org.apache.commons.dbutils

Examples of org.apache.commons.dbutils.QueryRunner.update()


          sql += " ," + columnName + "=" + parm;
        }
      }

      try {
        i = queryRunner.update(conn, sql, paramList.toArray());
        conn.commit();
        return i;
      } catch (SQLException se) {
        conn.rollback();
        throw new ControllerException(se);
View Full Code Here


      if (whereClause != null) {
        sql += " where " + whereClause;
      }

      return queryRunner.update(sql);
    } catch (SQLException se) {
      log.warning("GenericController SQLException: " + se.getMessage());
      throw new ControllerException(se);
    }
  }
View Full Code Here

      }

      sql += " where (" + primaryKeyName + "=?)";
      paramList.add(columnMap.get(primaryKeyName));
      // Add primaryKey value to paramList
      int result = queryRunner.update(sql, paramList.toArray());

      if (result == 0) {
        conn.rollback();
      } else {
        conn.commit();
View Full Code Here

    if (withGrantOption) {
      sql += " with grant option";
    }

    try {
      queryRunner.update(sql);
    } catch (SQLException se) {
      log.warning("GenericController: " + se.getMessage());
      throw new ControllerException(se);
    }
  }
View Full Code Here

        + databaseObject
        + " from "
        + userName;

    try {
      queryRunner.update(sql);
    } catch (SQLException se) {
      log.warning("GenericController: " + se.getMessage());
      throw new ControllerException(se);
    }
  }
View Full Code Here

    QueryRunner queryRunner = new QueryRunner(dataSource);
    String sql =
      "delete from SYS_INFO.sUSRGrant where (grantee='" + userName + "')";

    try {
      queryRunner.update(sql);
    } catch (SQLException se) {
      log.warning("GenericController: " + se.getMessage());
      throw new ControllerException(se);
    }
  }
View Full Code Here

        + databaseObject
        + " from "
        + userName;

    try {
      queryRunner.update(sql);
    } catch (SQLException se) {
      log.warning("GenericController: " + se.getMessage());
      throw new ControllerException(se);
    }
  }
View Full Code Here

          sql += " ," + columnName + "=" + parm;
        }
      }
     
      try {
        return queryRunner.update(conn, sql, params);
      } catch (SQLException se) {
        throw new ControllerException(se);
      }
    } catch (SQLException se) {
      log.warning("GenericController SQLException: " + se.getMessage());
View Full Code Here

     
      if (whereClause != null) {
        sql += " where " + whereClause;
      }
     
      return queryRunner.update(conn, sql);
    } catch (SQLException se) {
      log.warning("GenericController SQLException: " + se.getMessage());
      throw new ControllerException(se);
    }
  }
View Full Code Here

        }
      }
     
      sql += " where (" + primaryKeyName + "=?)";
      paramList.add(columnMap.get(primaryKeyName))// Add primaryKey value to paramList
      return queryRunner.update(conn, sql, paramList.toArray());
    } catch (SQLException se) {
      log.warning("SQL Exception: " + se.getMessage());
      throw new ControllerException(se);
    }
  }
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.