Hi,
I am not really used to program dynamically Arrays, so that´s why I finally will post my question here.
I have a DB with some data and want to add thos data to an array. I found an example using array, the code is
Code:
Dim a, b
Dim h
a = Array("Denmark", "Germany", "Sweden", "Norway", "France", "Italy", "Iceland", "Belgium", "Greenland", "Japan")
b = Array(1490, 1007, 64, 1938, 1550, 1890, 721, 554, 450, 1450)
h = Array(1225, 1299, 687, 1571, 153, 1581, 1148, 772, 1295, 414)
Dim objGraph
Set objGraph = New PureAspGraph
objGraph.setTitle("Demonstration 3")
Call objGraph.setYAxesTitle("Countries")
Call objGraph.setXAxesTitle("Hits per day")
Call objGraph.setData(a, b)
Call objGraph.addData(h)
Call objGraph.addLabel("Data 1")
Call objGraph.addLabel("Data 2")
Call objGraph.addLabel("Data 3")
Call objGraph.addLabel("Data 4")
Call objGraph.addLabel("Data 5")
Call objGraph.setType(0)
Call objGraph.setBarWidth(6)
Call objGraph.print()
Now I want to see if I can fill these arrays with other data
How can I do this. I thought of just using something like or something like it
Code:
a="Array(")
DO WHILE NOT RS.EOF
a=a&rs("data")
Rs.MoveNext
LOOP
a=a&")""
...
Call objGraph.setData(a, b )
Call objGraph.addData(h)
But it doesn´t work. I know it is simple, but my brain is still in the "I hate mondays" position.....
ny help is welcome!!!!
Thx