} catch (SQLException sqe) { System.err.println("executeQuery failed: " + sql);
  public void executeSQL(String rawSql, QueryHandler qh) {    try {      String driver = qh.getParameter("Driver");      if (driver != null) {	DBConnectionPool.registerDriver(driver);      }      String dbname = qh.getParameter("Database");      if (dbname == null) {	throw new RuntimeException("No Connection parameter.");      }            // do Param substitution      String sql;      sql = produceQuery(qh, rawSql);      Properties props = new Properties();      String user = qh.getParameter("Username");      if (user == null) user = qh.getParameter("user");      String pass = qh.getParameter("Password");      if (pass == null) pass = qh.getParameter("password");      if (user == null || pass == null)	throw new RuntimeException("Incomplete user/password parameters");      props.put("user", user);      props.put("password", pass);      Connection conn = DBConnectionPool.getConnection(dbname, user, pass);      try {        Statement statement = conn.createStatement();        ResultSet rset = statement.executeQuery(sql);        ResultSetMetaData md = rset.getMetaData();        int ncols = md.getColumnCount();                Object row[] = new Object[ncols];        while (rset.next()) {	  for (int i = 0; i < ncols; i++)            row[i] = rset.getObject(i+1);	  qh.processRow(row);        }        statement.close();      } finally {        conn.close();      }    } catch (Exception e) {      System.err.println("Caught exception while executing a query: "+e);      e.printStackTrace();    }  }