User (Legacy) Posted December 26, 1999 Report Share Posted December 26, 1999 Hi, I am new to using chartfx and need some help in accessing data from SQL server. I have used the following code to connect to the database and assign it to Chartfx component using "CHART1.AdoResultset objRS" statment. The recordset "objRS" gets data from the data base which I am able to display in a table, but am not able to assign the data to ChartFx, can any one help. Thanks Ravi <%@ Language=VBScript %> <% ' VI 6.0 Scripting Object Model Enabled %> <!--#include file="_ScriptLibrary/pm.asp"--> <% if StartPageProcessing() Then Response.End() %> <FORM name=thisForm METHOD=post> <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> </HEAD> <BODY> <OBJECT classid=CLSID:5220cb21-c88d-11cf-b347-00aa00a28331> <PARAM NAME ="LPKPATH" VALUE ="/LICENSE/CFXAX.LPK"> </OBJECT> <% Set Conn = Server.CreateObject("ADODB.Connection") Set objRS = Server.CreateObject("ADODB.RecordSET") value ="DRIVER=SQL Server;SERVER=TRYSQL;UID=yy;pwd=rabbit;DATABASE=moon" Conn.Open( value) sq = " SELECT Salary, Name FROM Data_Sal Where( Data_Sal.Locname = 'COLUMBIA' AND Data_Sal.Year = 1997)" set objRS = Conn.Execute(sq) SET CHART1 = SERVER.CreateObject("CHARTFX.WEBSERVER") 'TURNS OFF 3D STYLE CHART1.CHART3D = FALSE CHART1.RGBBK = RGB(155,155,755) CHART1.TITLE(2) = " CLAIMS" CHART1.AdoResultset objRS %> <% =CHART1.GETHTMLTAG(500,350) %> Link to comment Share on other sites More sharing options...
User (Legacy) Posted December 26, 1999 Author Report Share Posted December 26, 1999 Hi, I am new to using chartfx and need some help in accessing data from SQL server. I have used the following code to connect to the database and assign it to Chartfx component using "CHART1.AdoResultset objRS" statment. The recordset "objRS" gets data from the data base which I am able to display in a table, but am not able to assign the data to ChartFx, can any one help. Thanks Ravi <%@ Language=VBScript %> <% ' VI 6.0 Scripting Object Model Enabled %> <!--#include file="_ScriptLibrary/pm.asp"--> <% if StartPageProcessing() Then Response.End() %> <FORM name=thisForm METHOD=post> <HTML> <HEAD> <META NAME="GENERATOR" Content="Microsoft Visual Studio 6.0"> </HEAD> <BODY> <OBJECT classid=CLSID:5220cb21-c88d-11cf-b347-00aa00a28331> <PARAM NAME ="LPKPATH" VALUE ="/LICENSE/CFXAX.LPK"> </OBJECT> <% Set Conn = Server.CreateObject("ADODB.Connection") Set objRS = Server.CreateObject("ADODB.RecordSET") value ="DRIVER=SQL Server;SERVER=TRYSQL;UID=yy;pwd=rabbit;DATABASE=moon" Conn.Open( value) sq = " SELECT Salary, Name FROM Data_Sal Where( Data_Sal.Locname = 'COLUMBIA' AND Data_Sal.Year = 1997)" set objRS = Conn.Execute(sq) SET CHART1 = SERVER.CreateObject("CHARTFX.WEBSERVER") 'TURNS OFF 3D STYLE CHART1.CHART3D = FALSE CHART1.RGBBK = RGB(155,155,755) CHART1.TITLE(2) = " CLAIMS" CHART1.AdoResultset objRS %> <% =CHART1.GETHTMLTAG(500,350) %> Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.