Page 1 of 1

Database connection

Posted: Tue Jul 12, 2005 8:34 am
by 9527619
Hello,
I've just buy Tchart last week.
I want to make a chart with data on my Access database by programm.
I have write :
Graphique.Series(0).DataSource = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=G:\access\seroba\TableauxDeBordsDT.mdb;Persist Security Info=False; SQL=select * from [@PourcentageUneAffaire] where NumAffaire = '" & Me!NumAffaire & "'"

But my graph is empty.

Could you help me ?
Thanks

Posted: Tue Jul 12, 2005 8:46 am
by narcis
Hi jps,

I'd suggest you to have a look at the tutorials at TeeChart program group. Specially "Tutorial 8 - ADO Database access". You can also have a look at TeeChart features demo examples. This demo is also available at TeeChart program group.

Posted: Tue Jul 12, 2005 9:29 am
by 9527619
Hello,

I have read this tutorial but I dont want to use Microsoft OLE DB
ActiveX Data Objects 1.0 Library.
When I make my chart in design mode, it work fine. I just want to change the SQL syntax to send a WHERE clause.
thanks for your responses

Posted: Tue Jul 12, 2005 9:31 am
by narcis
Hi jps,

Have you tried using TChart1.Series(0).CheckDataSource method after populating your series?

Posted: Tue Jul 12, 2005 9:43 am
by 9527619
Yes I have write this line after the datasource definition :
Graphique.Series(0).CheckDataSource
but nothing appends

Posted: Wed Jul 13, 2005 11:03 am
by narcis
Hi jps,

Could you please send us an example we can run "as-is" to reproduce the problem here? You can post your files at [url]news://www.steema.net/steema.public.attachments[/url] newsgroup.

Thanks in advance.