User (Legacy) Posted July 3, 2001 Report Share Posted July 3, 2001 Dear all hello? I korean(so beautiful contury). so I do not well wirte english~ ^^; obtain ask for you consent. I beginning chartfx and SQL... Database... ODBC... etc... I get an error that AtiveX display in chartfx. Why don't display AtiveX? -->source ******************************* SQL ******************************** create TABLE sale(Mon varchar (10), sales varchar(10), Projected varchar(10)) select * from sale insert into sale(Mon,sales,Projected) values('12','85','50') ********************************** database.asp ******************************** <pre> <HTML> <HEAD> <meta name="Description" content="This sample shows you how to connect a chart to an ADO recordset to read the data from a database"> <meta name="KBKeyword" content="Database"> <meta name="KBKeyword" content="AdoResultset"> <meta name="KBKeyword" content="SQL"> <meta name="KBKeyword" content="ADO"> <meta name="KBTechnology" content="cie45srv"> <meta name="KBProduct" content="cfxie45"> <meta name="KBType" content="SAMPLE"> <TITLE>SAMPLE: Connecting to a database</TITLE> </HEAD> <BODY bgcolor="#ffffff"> <!-- #include virtual="/CfxIE/Include/ShowCode.asp" --> <font face="Verdana,Arial,Helvetica" size="2"> This sample shows you how to connect a chart to an ADO recordset to read the data from a database <p> <%SHOWASPCODE=1%> <!-- Include this file so we can use all the ChartFX constants --> <!-- #include virtual="/Include/CfxIE.inc" --> <% Set chart = Server.CreateObject("ChartFX.WebServer") 'COSMETIC=1 ' The samples look better in white chart.RgbBk = RGB(255,255,255) 'COSMETIC=0 ' Create the database connection object Set Conn = Server.CreateObject("ADODB.Connection") ' Open the ODBC data source Conn.Open ("dsn=firstwork; uid=sa; pwd=1") ' Execute the SQL statement that will return the data Set RS = Conn.Execute("SELECT Mon, sales, Projected From sale") 'BOLD=1 ' Assign the contents of the ResultSet to the Chart chart.AdoResultset RS 'BOLD=0 ' Close the connection Conn.Close %> <%= chart.GetHtmlTag("500","350") %> <%SHOWASPCODE=0%> <hr> <b>Source code that generates this chart:</b> <br> <% ShowCode("")%> <% ShowDisclaimer()%> </font> </BODY> </HTML> </pre> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.