JDBCChartAdapter suggestions

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

JDBCChartAdapter suggestions

Post by Andy » Fri Apr 26, 2002 5:24 pm

Bryan,

Here are my suggestions for JDBCChartAdapter code. They should be very easy to implement.

1. close connection at the end of processing only when url/user/password were provided. Do not close connection when it was supplied through JDBCChartAdapter(Connection)

2. Add constructors with SQL statements as parameters (like JDBCChartAdapter( conn, sql ) and JDBCChartAdapter( url, user, pass, sql)). It will allow to use create*Chart without extra object (like createChart( "title", new JDBCChartAdapter( conn, "select * from my_table"), true )).

Thanks
Andy

Bryan

Re: JDBCChartAdapter suggestions

Post by Bryan » Sat Apr 27, 2002 9:45 am

Andy

Thanks for the feedback.

1. Need to think about. It might be more flexible to allow specification. ie setAutoConnectionClose(boolean close)

2. Yep sounds good. I will add to the next update. which I should get to David next week.

Bryan

Locked