public void update(String table, String nameColumn, String valueColumn,
			String nameID, int valueID) {

		try {
			con = DriverManager.getConnection(url, user, password);

			String stm = null;

			stm = "UPDATE " + table + " SET " + nameColumn + " = '" + valueColumn + "' WHERE "
					+ nameID + " = " + valueID;
			pst = con.prepareStatement(stm);

			// execute statement me
			pst.executeUpdate();

		} catch (SQLException ex) {
			Logger lgr = Logger.getLogger(UpdateMethod.class.getName());
			lgr.log(Level.SEVERE, ex.getMessage(), ex);

		} finally {

			try {
				if (pst != null) {
					pst.close();
				}
				if (con != null) {
					con.close();
				}

			} catch (SQLException ex) {
				Logger lgr = Logger.getLogger(UpdateMethod.class.getName());
				lgr.log(Level.SEVERE, ex.getMessage(), ex);
			}
		}
	}