I implemented a variant of the SqlDataSourceServlet class where I
specify the database connection parameters and load the jdbc driver:

...
        public DataTable generateDataTable(Query query, HttpServletRequest
request) throws DataSourceException {
                try {
                        Class.forName("com.mysql.jdbc.Driver").newInstance();
                        SqlDatabaseDescription dbDescription = new 
SqlDatabaseDescription
(db,user,pssw,table);
                        data = SqlDataSourceHelper.executeQuery(query, 
dbDescription);
                } catch (Exception e) {
                        e.printStackTrace();
                }
                return SqlDataSourceHelper.executeQuery(query, dbDescription);
        }
...

I get an error in the response:
google.visualization.Query.setResponse
({version:'0.6',status:'error',errors:
[{reason:'internal_error',message:'Internal
error',detailed_message:'Failed to connect to database server.'}]});

The RestrictedAccessMode is set to false. So I am not sure why I am
getting this error. Any ideas?

Thanks.
-- 
You received this message because you are subscribed to the Google Groups 
"Google Visualization API" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-visualization-api?hl=en.


Reply via email to