tags:

views:

20

answers:

1

Hello

I wonder if anyone can help? I'm trying to use part of Google's Visualization API as shown here:

Google TableQueryWrapper

To get data from a MySQL database table. I have mapped the URL in the .html shown in this example to my application which calls a servlet provided by Google as follows:

public class SQLDataSource_Servlet extends DataSourceServlet {

/**
   * The SQL predefined capabilities set is a special custom set for SQL
 * databases. This implements most of the data source capabilities more
 * efficiently.
 */
@Override
public Capabilities getCapabilities() {      
  return Capabilities.SQL;
}

@Override
public DataTable generateDataTable(Query query, HttpServletRequest request)
    throws DataSourceException {
 SqlDatabaseDescription dbDescription = new SqlDatabaseDescription(
        "jdbc:mysql://localhost:3306/myApp",


    "root", "password","table");

return SqlDataSourceHelper.executeQuery(query, dbDescription);

}

But I always end up with all columns of the table I want the data from rather than a subset of the columns.

Is anyone able to suggest why?

Thanks

Mr Morgan

A: 

A mistake on my part. This is resolved.

Mr Morgan