Page 1 of 1
sum operation
Posted: Wed Jun 14, 2006 8:08 am
by 9529779
if my sqlcommand is:
sql=select datadate,sum(stock) from test_view group by datadate order by datadate
then, how should i get the YValuesource
i had tried some code ,below as
mychart1.Series(0).YValues.ValueSource="stock"
or
mychart1.Series(0).YValues.ValueSource="sum(stock)"
but it doesn't work
Posted: Wed Jun 14, 2006 10:49 am
by narcis
Hi w6p2,
You should create a dataset from that query and have a look at the table within that dataset to see what name is given the columns. It can be of help having a look at Tutorial8 - ADO.NET Database Access. You'll find the tutorials at TeeChart's program group.
Posted: Thu Jun 15, 2006 12:55 am
by 9529779
why is my tutorial 8 is "Tutorial 8 - ADO Database access" not ADO.net?
my software version is TeeChart Pro v7 ActiveX Control
Posted: Thu Jun 15, 2006 1:11 am
by 9529779
Dim ds As New DataSet
Dim da As New SqlDataAdapter
.....
...
da.fill(ds)
mychart1.Series(0).DataSource = ds
but it displayed an error message
Posted: Thu Jun 15, 2006 7:56 am
by narcis
Hi w6p2,
why is my tutorial 8 is "Tutorial 8 - ADO Database access" not ADO.net?
my software version is TeeChart Pro v7 ActiveX Control
Ok, then that's the right tutorial. You originally posted the message at the TeeChart for .NET forum and I assumed you were using TeeChart for .NET. I moved your message to the TeeChart Pro ActiveX forum.
but it displayed an error message
Which error message did you get?