public List<String> getListForQuery(String query)
  {
    List<String> resultList = new ArrayList<String>();
    
    // try the following
    try {
      
      // open the connection to the database
      Connection connection = 
        DriverManager.getConnection(this.urlStr);
      
      // create a statement
      Statement statement = connection.createStatement();
      
      // execute the query
      ResultSet rs = statement.executeQuery(query);
      
      // find out how many columns are in the result 
      ResultSetMetaData rsmd = rs.getMetaData();
      int numCols = rsmd.getColumnCount();
      
      // print out the results
      if (rs.next())
      {
        for (int i = 1; i <= numCols; i++)
          resultList.add(rs.getString(i));
      }
      
      // close everything
      rs.close();
      statement.close();
      connection.close();
      
    } catch (SQLException ex) {
      SimpleOutput.showError("Trouble with the database " + urlStr);
      ex.printStackTrace();
    }
    
    return resultList;
  }