- ASP - Database Table Display
·Script Writers
·Database Display
·Response Objects
·Server Variables
·Random Events
·What's New?
Mail List


Financial Graph
Utilizing some simple html and the output from an access db effective graphs can be produced without the need for third party components.  The example data base contains the weekly highs (high), the week ending date (weekof) and stock split (split) info for Yahoo. The height of an image file (blue.jpg) is adjusted to the week ending high (high) and the alt for that image is set to the week ending date (weekof) and the value (high).
View the Output
Text View
Print View
Mail this Link
Download the Code
View the Data

cn="DRIVER={Microsoft Access Driver (*.mdb)};"
cn=cn & "DBQ=" & server.mappath(accessdb)
Set rs = Server.CreateObject("ADODB.Recordset")
sql = "select * from yahoo order by weekof asc " 
rs.Open sql, cn

<div align="center">
<table cellspacing="0" cellpadding="0">
On Error Resume Next
' sets the low and high for the range equal to the 1st weeks high
low = rs("high")
do while Not rs.eof

<td width="5" align="left" valign="bottom">
<img src="images/blue.jpg" width="5" height="<%= rs("high") %>
alt="Week of <%= rs("weekof") %>, High was $<%= formatnumber(rs("high"),2) %>"></td>
' if the current week is lower then the 1st or any lower week then place it in low
if low > rs("high") then 
low = rs("high") 
end if
' if the current week is higher then the 1st or any higher week then place it in high
if high < rs("high") then 
high = rs("high") 
end if
' what is the latest week
' counts the number of cells being used to generate the dynamic graph
' if there was a split add it to splits
if rs("split") <> "" then
splits= splits & "<br>" & rs("split") & "-" & rs("weekof")
end if

<table cellspacing="0" cellpadding="0"><tr>
<td align="center" valign="top" width="<%= count_cells*5 %>">
<% rs.Movefirst %>
Yahoo Weekly Highs from <%= rs("weekof")%> to <%= last_week %>
<br>Low for this range : $<%= formatnumber(low,2) %>
<br>High for this range : $<%= formatnumber(high,2) %>
<br> <%= splits %>





ASP: What's New? | Articles | Script Writers | Database Display | Read/Write
Server Variables | Response Objects | Random Events | Miscellaneous
HTML: Forms | Hyperlinks | Headers | Tables | Hyperlinks | Headers | Text Display
JavaScript: Document Info | Forms | Images | Navigation | Script Writers
CSS: Basics | Page Display | Text Display | Script Writers | Miscellaneous
  • 2014 michael kors
  • air max women 2013
  • 2014 michael kors
  • air max 2014
  • oakley glasses
  • oakley glasses

  • Maps: Map Script Writers | Bing Maps | Google Maps
  • bottes fr
  • ugg boot
  • Privacy Statement is hosted by
    Donate Food Online with a Mouse Click at
    Donate Land Online with a Mouse Click at
    © 1999 - 2018
    All Rights Reserved

  • Kids jordan 6 rings
  • Jordan retro 10
  • Jordan retro 3