sum operation

TeeChart for ActiveX, COM and ASP
Post Reply
w6p2
Newbie
Newbie
Posts: 14
Joined: Thu Dec 29, 2005 12:00 am
Contact:

sum operation

Post by w6p2 » Wed Jun 14, 2006 8:08 am

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

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Wed Jun 14, 2006 10:49 am

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.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

w6p2
Newbie
Newbie
Posts: 14
Joined: Thu Dec 29, 2005 12:00 am
Contact:

Post by w6p2 » Thu Jun 15, 2006 12:55 am

why is my tutorial 8 is "Tutorial 8 - ADO Database access" not ADO.net?
my software version is TeeChart Pro v7 ActiveX Control

w6p2
Newbie
Newbie
Posts: 14
Joined: Thu Dec 29, 2005 12:00 am
Contact:

Post by w6p2 » Thu Jun 15, 2006 1:11 am

Dim ds As New DataSet
Dim da As New SqlDataAdapter
.....
...
da.fill(ds)
mychart1.Series(0).DataSource = ds

but it displayed an error message

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Thu Jun 15, 2006 7:56 am

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?
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply