User (Legacy) Posted July 14, 2000 Report Share Posted July 14, 2000 The QuerySelector object is a Java class that queries values from a database. We are using a com to java bridge to pass the java vectors to our asp code as vb collections. We can plot the vb collections by looping through each collection as shown ChartFX1.OpenDataEx COD_VALUES,3,COD_UNKNOWN ChartFX1.OpenDataEx COD_XVALUES,3,COD_UNKNOWN for each value in myKW ChartFX1.ValueEx(0,j)=value StringTime = j+1 ChartFX1.XValueEx(0,j)=StringTime j=j+1 next ChartFX1.CloseData COD_VALUES ChartFX1.CloseData COD_XVALUES We cannot however seem to add the collections to the CfxArray object and pass them to the getExternalData method. Some data is getting through as an apparently empty chart is produced and copying the data to excel shows that some of the data in the collections is passed to the chart. It just isn't being displayed correctly. Tarik Khan "Juan Cegarra" <JuanC@softwarefx.com> wrote in message news:DE0379D14694D211B4CE00609770710D05AFF6@sftfx-221.wamnet.net... > >> Is it possible to use a VB Collection in ASP to pass data to > ChartFX2000? > > Yes. The CfxData.Array supports VBScript arrays and objects that support > the IEnumVariant COM interface (We have tested VB collections under VB > and they work fine). > > Is there a way for you to send us the QuerySelector object so that we > can test why your code is not working ? > > Regards, > > Juan Cegarra > Software FX, Inc. > http://support.softwarefx.com > > > -----Original Message----- > From: Tarik Khan [ mailto:tkhan@hydro.mb.ca] > Posted At: Thursday, July 13, 2000 12:13 PM > Posted To: Server > Conversation: VB Collections in ASP > Subject: VB Collections in ASP > > > Is it possible to use a VB Collection in ASP to pass data to > ChartFX2000? > This seems similar to passing arrays to ChartFX but I cannot get the > chart > to generate my data. Here is the code I use to generate the chart. > > <% > Set ChartFX1=Server.CreateObject("ChartFX.WebServer.4") > Set Data=Server.CreateObject("QuerySelector") > Set CfxArray = CreateObject("CfxData.Array") > Server.ScriptTimeout=360 > Connect = Data.connectDB() > Response.Write(connect) > Query = Data.getEnergyCon(start,tend,CustID) > Response.Write(Query) > ChartFX1.RgbBk=RGB(255,255,255) > ChartFX1.Rgb2DBK=RGB(178,176,176) > ChartFX1.ChartType=LINES > ChartFX1.Chart3D=false > ChartFX1.AllowDrag=false > ChartFX1.AllowEdit=false > ChartFX1.SerLegBox=true > ChartFX1.ToolBar=true > ChartFX1.SerLegBoxObj.Docked=TGFP_BOTTOM > ChartFX1.MarkerShape=0 > Set myKW = Data.theKW ' this is a VB Collection Object > Set myKVAR = Data.theKVAR 'this is a second VB Collection Object > CfxArray.AddArray myKW > CfxArray.AddArray myKVAR > ChartFX1.serleg(0)="KW" > ChartFX1.serleg(1)="KVAR" > ChartFX1.DataType(0)=CDT_VALUE > ChartFX1.DataType(1)=CDT_VALUE > ChartFX1.GetExternalData CfxArray > %> > > <%=ChartFX1.GetHtmlTag("95%","90%") > %> > > Tarik Khan > Manitoba Hydro > Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.