Dear all,
I am currently learning how to program in classic asp and at the same time implementing a web page.
At the moment, the webpage is displaying a blank screen instead of line graph between variables date and price from the sql server database.
sql database DDLCode:DY> <% 'In this example, we show how to connect FusionCharts to a database. 'For the sake of ease, we've used an Access database which is present in '../DB/FactoryDB.mdb. It just contains two tables, which are linked to each 'other. 'Database Objects - Initialization Dim oRs, oRs2, strQuery 'strXML will be used to store the entire XML document generated Dim strXML 'Create the recordset to retrieve data Set oRs = Server.CreateObject("ADODB.Recordset") 'Generate the chart element strXML = strXML = "<graph caption='Deals Output report' subCaption='By Quantity' decimalPrecision='0' showNames='1' numberSuffix=' Units' pieSliceDepth='30' formatNumberScale='0'>" 'Iterate through each factory strQuery = "select * from deal_price2" Set oRs = oConnection.Execute(strQuery) While Not oRs.Eof 'Now create second recordset to get details for this factory Set oRs2 = Server.CreateObject("ADODB.Recordset") strQuery = "select sum(price) as TotOutput from deal_price where deal_id=" & ors("deal_id") Set oRs2 = oConnection.Execute(strQuery) 'Generate <set name='..' value='..'/> strXML = strXML & "<set name='" & ors("date") & "' value='" & ors2("TotOutput") & "' />" 'Close recordset Set oRs2 = Nothing oRs.MoveNext Wend ' 'Finally, close <chart> element strXML = strXML & "</chart>" Response.Buffer=true response.write strXML response.flush 'response.end Set oRs = nothing 'Create the chart - Line Chart with data from strXML Call renderChart("MyWeb/includes/FCF_Line.swf", "", strXML, "FactorySum", 650, 450) %>
I am using xml to represent graph data and currently its not doing that and I can not figure out why?Code:LECT [deal_id] ,[name] ,[cusip] ,[isin] ,[orig_price] ,[price] ,[size] ,[price_type] ,[date] FROM [dbo].[deal_price2] GO
Any help with this problem, would be very much appreciated.
Thank you in advance for your time and help.


Reply With Quote
Bookmarks