public void testQuery(String query, int numCols)
  {
    
    // 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);
      
      // print out the results
      while (rs.next())
      {
        for (int i = 1; i <= numCols; i++)
        {
          System.out.print(rs.getString(i) + ", ");
        }
        System.out.println();
      }
      
      // close everything
      rs.close();
      statement.close();
      connection.close();
      
    } catch (SQLException ex) {
      SimpleOutput.showError("Trouble with the database " + 
                             urlStr);
      ex.printStackTrace();
    }
  }