objBarGraph.DrawChart
jeg har hentet et plugin fra http://livesoup.com der skulle kunne tegne en graf. det virker hvis jeg bruger deres eksempel.<%
Dim objBarGraph
\' Create a new instance of the component
Set objBarGraph = Server.CreateObject(\"LiveSOUP.BarGraph\")
\' Add your Elements (obviously these could be created on the fly by a db query)
objBarGraph.AddElement 5300, \"The MrsJackson Component\"
objBarGraph.AddElement 2100, \"The GuruDev Component\"
objBarGraph.AddElement 8500, \"The BarGraph Component\"
\' Format the Look & Feel
objBarGraph.SetDisplayType true, false, false
objBarGraph.SetFontAttribs \"MS Sans Serif\", 4, \"#990033\", 2, \"#000000\"
objBarGraph.SetTableColors \"#990033\", \"#ffcc00\", \"#ffcc00\"
objBarGraph.SetTableDimensions 2, 380, 70, 16
objBarGraph.SetImages \"http://livesoup.com/images/live-logo.gif\", \"images/spacer.gif\", \"images/spacer.gif\"
\' Display your BarGraph
objBarGraph.DrawChart(\"COM Download Comparison\")
\' Free resources by removing the object
Set objBarGraph = nothing
%>
Men hvis jeg prøver mit eget som er :
<%
Dim objBarGraph
set connect = server.createobject(\"ADODB.Connection\")
Connect.open \"Driver={Microsoft Access Driver (*.mdb)}; DBQ=\" & server.mappath(\"graph.mdb\")
set rs = connect.execute(\"SELECT * FROM grap\")
Set objBarGraph = Server.CreateObject(\"LiveSOUP.BarGraph\")
with rs
do while not rs.eof
objBarGraph.AddElement rs(\"Navn\"), rs(\"Nummer\")
rs.movenext
loop
rs.close
end with
objBarGraph.SetDisplayType true, false, false
objBarGraph.SetFontAttribs \"MS Sans Serif\", 4, \"#990033\", 2, \"#000000\"
objBarGraph.SetTableColors \"#990033\", \"#ffcc00\", \"#ffcc00\"
objBarGraph.SetTableDimensions 2, 380, 70, 16
objBarGraph.SetImages \"http://livesoup.com/images/live-logo.gif\", \"http://livesoup.com/images/spacer.gif\", \"http://livesoup.com/images/spacer.gif\"
objBarGraph.DrawChart(\"COM Download Comparison\")
Set objBarGraph = nothing
set rs = nothing
set Connect = nothing
%>
Får jeg en fejl med Type Mitch Match line 34.
linie 34 er :
objBarGraph.DrawChart(\"COM Download Comparison\")
