Questions? Email us:
sales@haneng.com

 

Developers Forum



| List all messages | Search Developers forum | Post new forum message |



Error:
Edward Clark | Posted 7:31am 21. August 2001 Server Time |

With this code, I keep getting the error you must supply at least two parameters.  I have over 3,000 records in the database.  Also, can you adjust the scale of the chart to go from 59.0 to 61 instead of 0 to 60?

<HTML>
<BODY BACKGROUND="IMAGES/MAIN.GIF" BGPROPERTIES="FIXED" BGCOLOR="#ffffff" TEXT="#000000">
<H2><FONT face="Lucida Console"><FONT color=mediumblue>Mid-America
Interconnected Network, Inc.</FONT> </FONT></H2>
<H3><FONT face="Lucida Console">Current Frequency</FONT></H3>
<H3><FONT face="Lucida Console">
</h3>
<HR>
<!-- HanengCharts Code Starts Here --></FONT>
<p>
<CENTER>
<APPLET code=HanengCharts.class width=450 height=250 ARCHIVE="HanengCharts2.jar">

<PARAM NAME="licensekey" VALUE=":6HHC:]!-=#Z[q">
<PARAM NAME="charttype" VALUE="line">

<%
Dim intCounter

Db = "Driver={Microsoft Access Driver (*.mdb)}; DBQ="
Db = Db & Server.MapPath("Frequency.mdb") & ";"
Set MyConn = Server.CreateObject("ADODB.Connection")
MyConn.Open Db

SQL_query = "SELECT TOP 10 * FROM Frequency"

Set RS = MyConn.Execute(SQL_query)

intCounter = 1

WHILE NOT RS.EOF
  %>
       <PARAM NAME="text_<%=intCounter%>"  VALUE="<%=RS("CurrentTime")%>">
<PARAM NAME="value_<%=intCounter%>"  VALUE="<%=RS("Frequency")%>">
  <%
  intCounter = intCounter + 1
  RS.MoveNext
WEND

RS.Close
Set RS = nothing

MyConn.Close
Set MyConn = nothing
%>

</APPLET>
</CENTER><!-- HanengCharts Code Ends Here -->
</BODY>
</HTML>
HanengCharts Support | Posted 8:17am 21. August 2001 Server Time |

Hi Edward,
To get the chart to go from 59.0 to 61 add the GridStart and GridStop parameters:
<PARAM NAME="GridStart" VALUE="59">
<PARAM NAME="GridStop" VALUE="61">

I am not sure what is wrong with the ASP code, it looks right. Try viewing the source code that is sent to the browser (in IE go to View -> Source) and make sure the output is OK. If that doesn't solve the problem please let me know.

-HanengCharts Support
Want to reply?
We are sorry, but this forum is closed. If you have any support questions please email us at support@haneng.com