try this on i used in java String url = "jdbc:mysql://localhost:3306/test";
Connection con = DriverManager.*getConnection*(url, "root","project"); Statement stmt = con.createStatement(); On 4/4/09, Mohit Sareen <[email protected]> wrote: > > > HI, > > How do I use Apache Derby database to feed data to visualization > apis ? > > What is the datasource url that needs to be sent ? > > var query = new google.visualization.Query( > 'jdbc:derby://localhost:1527/C:/Program File...); > > will it be a jdbc url ? > > how to use tqx to specify database username & password ? > > Thanks. > > Mohit > > On Feb 9, 5:10 pm, MartinOShea <[email protected]> wrote: > > Hello > > > > I'm a 'newbie' with the Google Visualization API but I wonder if > > anyone can advise with an issue I have? > > > > I'm working on a system where users will be able to generate various > > visualisations from various datasets created from tables they upload. > > And I want to use the Google Visualization API to create the > > visualisations, i.e. bar charts, word clouds etc. > > > > My application uses Java servlets and JSPs with a MySQL back-end > > database. Now, as I see it, there are two ways for me to return data > > from the database for use in the Google Visualization API Javascript: > > > > The first is to read the data into a 2D-array on the server and pass > > this to a JSP and construct the Javascript like this: > > > > <% > > for(int i = 1; i < rowcount; i++){ > > > > for(int j = 0; j<columncount; j++){ > > table[i][j] = (table[i][j] > > ==null)?"":table[i][j]; > > out.print("data.setCell("+ > > (i-1)+", "+j+", '"+table[i][j]+"');"); > > } > > } > > > > %> > > > > Or I can use my preference which is to use Google Visualization URLs > > with JSON of the type: > > > > var query = new google.visualization.Query(http://www.example.com/ > > mydatasource) > > > > However, is it necessary to specify the reqID and sig fields at all? > > > > Also, am I right in thinking that the reponse to this can be > > constructed dynamically as a string containing the data in a servlet? > > > > And that some encoding or decoding of URLs might be needed? > > > > Thanks > > > > MartinO'Shea. > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
