Jdbc

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
Locked
herve

Jdbc

Post by herve » Wed Aug 14, 2002 5:44 pm

Hello,

How to scour the data with jdbc on the Line Chart?

thanks

Bryan

Re: Jdbc

Post by Bryan » Wed Aug 14, 2002 8:23 pm

Herve

what is scour?
Am I right in saying populate? If so have a look at the jdbcXXXXDataset classes in JCommon (from the same web site as JFreeChart)

Bryan

herve

Re: Jdbc

Post by herve » Thu Aug 15, 2002 11:41 am

Hello,

please a simple example.

Thanks...

David Gilbert

Re: Jdbc

Post by David Gilbert » Thu Aug 15, 2002 12:33 pm

I have been looking at Bryan's JDBC datasets (good job Bryan!) and adding descriptions to the JFreeChart PDF documentation (available to purchase via Kagi).

In the process, I have written some simple demo applications and committed these to CVS. These demo programs will be included in the 0.9.3 distribution, or you can get them now from CVS on SourceForge. I have also written up a new chapter for the PDF documentation describing how to populate a database (example uses PostgreSQL) to run these demos...for those that have purchased the documentation, I will be releasing an update during the next week.

Regards,

DG.

herve

Re: Jdbc

Post by herve » Thu Aug 15, 2002 2:14 pm

I've download JDBCCategoryChartDemo.java (CVS) but i've a problem

Msg error : java.sql.SQLException : No data found

--> My Bdd is Ms-Access

-------------------------------------------------------------

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");

String url = "jdbc:odbc:test";

con = DriverManager.getConnection(url, "toto", "toto");

String sql = "SELECT * FROM essai;";

NB : ODBC32 is correct.
even thing for JDBCXYChartDemo.java and JDBCPieChartDemo.java

Thanks

Enrique

Re: Jdbc

Post by Enrique » Fri Aug 16, 2002 5:33 pm

I've been using Bryan's jdbc datasets (JdbcCategoryDataset,JdbcPieDataset) with mySql.

I haven't been able to get the category one to work(yet!), but the Pie dataset works wonderfully. I did have to add support* for Types.BIGINT to get it to work with MySql (count(*) seems to return a bigint).


*support meaning adding an extra case to the two switch statements.
...
case Types.BIGINT:
...

Cheers
E

Bryan

Re: Jdbc

Post by Bryan » Fri Aug 16, 2002 10:36 pm

Enriqrue

There is an update on CVS to categorydataset.

Please drop us an email on the changes you did for mysql support. NB I utilise Oracle as my DB.


Bryan

Locked