FusionCharts for Dreamweaver - Developer Edition Forum


box FusionCharts for Dreamweaver - Developer Edition
FusionCharts is a Dreamweaver Charting Extension that can be used to render data-driven & animated charts for web applications and presentations. FusionChartsDW is a cross-browser and cross-platform solution that can be used with ASP.VB, PHP, and ColdFusion to deliver interactive and powerful flash charts.

Find out more about FusionCharts for Dreamweaver - Developer Edition

Thread: Rowset position cannot be restarted

title left
User Details
message
title right
Christoffer L Aas

post date:
2009-11-28 14:36:51
Hi, I am trying to get Fusioncharts to work on a page that is going to show some evaluation scores for pupils. I am passing the values of the pupil, the klassvalue, the question category value to the page with the chart. I am passing the values with post and retrieving the values with Request.Form - from a form. But I get this erros:rnrnrnMicrosoft OLE DB Provider for SQL Server error '80040e18'rnrnRowset position cannot be restarted.rnrn/JegKanMal/includes/FusionCharts/dynamic/DWFChart.inc.asp, line 378rnrnThe codes are as this: rnrnThe part of the page that sends the param:rnrn <% if (Request.Form("fagid_form") = 1) Then %>rn <form action="enkstovis.asp" method="post" name="velgtrinn_form" id="velgtrinn_form" >rn <tr>rn <td width="20%" align="left" valign="middle" class="norskbkgr">Velg elev:</td>rn <td width="20%" align="left" valign="middle" class="norskbkgr"><label>rn <select name="elevid_form" id="elevid_form">rn <option value="0">Velg elev</option>rn <%rnWhile (NOT Recordset4.EOF)rn%>rn <option value="<%=(Recordset4.Fields.Item("elev_id").Value)%>"><%=(Recordset4.Fields.Item("elevfornavn").Value)%></option>rn <%rn Recordset4.MoveNext()rnWendrnIf (Recordset4.CursorType > 0) Thenrn Recordset4.MoveFirstrnElsern Recordset4.RequeryrnEnd Ifrn%>rn </select>rn </label></td>rn <td width="20%" class="norskbkgr">Velg trinn:rn <input type="hidden" name="jegkanfag_id" id="jegkanfag_id" value="1" /> </td>rn <td width="20%" class="norskbkgr"><label></label>rn rn <label></label>rn <p>rn <%if (Request.Form("fagid_form")) = 1 then %>rn <select name="jegkantrinnid">rn <option value="20" selected="selected">Velg trinn</option>rn <option value="1">Trinn 1</option>rn <option value="2">Trinn 2</option>rn <option value="3">Trinn 3</option>rn <option value="4">Trinn 4</option>rn <option value="5">Trinn 5</option>rn <option value="6">Trinn 6</option>rn <option value="7">Trinn 7</option>rn <option value="8">Trinn 8</option>rn </select>rn <% End if %>rn <%if (Request.Form("fagid_form")) = 2 then %>rn <select name="jegkantrinnid">rn <option value="20">Alle</option>rn <option value="1">Trinn 1</option>rn <option value="2">Trinn 2</option>rn <option value="3">Trinn 3</option>rn <option value="4">Trinn 4</option>rn <option value="5">Trinn 5</option>rn <option value="6">Trinn 6</option>rn <option value="7">Trinn 7</option>rn </select>rn <% End if %>rn <%if (Request.Form("fagid_form")) = 3 then %>rn <select name="jegkantrinnid">rn <option value="20">Alle</option>rn <option value="1">Trinn 1</option>rn <option value="2">Trinn 2</option>rn <option value="3">Trinn 3</option>rn <option value="4">Trinn 4</option>rn <option value="5">Trinn 5</option>rn <option value="6">Trinn 6</option>rn <option value="7">Trinn 7</option>rn <option value="8">Trinn 8</option>rn </select>rn <% End if %>rn <%if (Request.Form("fagid_form")) = 4 then %>rn <select name="jegkantrinnid">rn <option value="20">Alle</option>rn <option value="1">Trinn 1</option>rn <option value="2">Trinn 2</option>rn <option value="3">Trinn 3</option>rn <option value="4">Trinn 4</option>rn </select>rn <% End if %>rn <%if (Request.Form("fagid_form")) = 5 then %>rn <select name="jegkantrinnid">rn <option value="20">Alle</option>rn <option value="1">Trinn 1</option>rn <option value="2">Trinn 2</option>rn <option value="3">Trinn 3</option>rn <option value="4">Trinn 4</option>rn <option value="5">Trinn 5</option>rn <option value="6">Trinn 6</option>rn <option value="7">Trinn 7</option>rn <option value="8">Trinn 8</option>rn <option value="9">Trinn 9</option>rn <option value="10">Trinn 10</option>rn <option value="11">Trinn 11</option>rn <option value="12">Trinn 12</option>rn <option value="13">Trinn 13</option>rn <option value="14">Trinn 14</option>rn <option value="15">Trinn 15</option>rn <option value="16">Trinn 16</option>rn </select>rn <% End if %>rn </p>rn <p>&nbsp; </p>rn <td class="norskbkgr"><label>rn rn <input type="submit" name="velgtrinnlagre" id="velgtrinnlagre" value="Submit" />rn </label></td>rn </tr>rn </form>rn <% End if %>rnrn-----------------------------------------------------------rnrnThe page that recieves the values (The recordset codes:rnrn<%rnDim Recordset1__MMColElevIDrnRecordset1__MMColElevID = "157"rnIf (Request.Form("elevid_form") <> "") Then rn Recordset1__MMColElevID = Request.Form("elevid_form")rnEnd Ifrn%>rn<%rnDim Recordset1__MMColFagIDrnRecordset1__MMColFagID = "3"rnIf (Request.Form("jegkanfag_id") <> "") Then rn Recordset1__MMColFagID = Request.Form("jegkanfag_id")rnEnd Ifrn%>rn<%rnDim Recordset1__MMColTrinnIDrnRecordset1__MMColTrinnID = "1"rnIf (Request.Form("jegkantrinnid") <> "") Then rn Recordset1__MMColTrinnID = Request.Form("jegkantrinnid")rnEnd Ifrn%>rn<%rnDim Recordset1rnDim Recordset1_cmdrnDim Recordset1_numRowsrnrnSet Recordset1_cmd = Server.CreateObject ("ADODB.Command")rnRecordset1_cmd.ActiveConnection = MM_JegKanMal_STRINGrnRecordset1_cmd.CommandText = "SELECT jegkanelev_id, fk_jegkan_id, fk_elev_id, fk_vurdering_id, dato_vurdert, jegkan_id, jegkanfag, jegkantrinn, jegkannr, jegkantekst FROM chlaas_medklin.db_jegkanelev INNER JOIN chlaas_medklin.db_jegkan ON fk_jegkan_id = jegkan_id WHERE fk_elev_id = ? AND jegkanfag = ? AND jegkantrinn = ?" rnRecordset1_cmd.Prepared = truernRecordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param1", 5, 1, -1, Recordset1__MMColElevID) ' adDoublernRecordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param2", 5, 1, -1, Recordset1__MMColFagID) ' adDoublernRecordset1_cmd.Parameters.Append Recordset1_cmd.CreateParameter("param3", 5, 1, -1, Recordset1__MMColTrinnID) ' adDoublernrnSet Recordset1 = Recordset1_cmd.ExecuternRecordset1_numRows = 0rn%><%rnDim dFCFusionChart4: Set dFCFusionChart4 = new DWFChartrnFusionChart4_dataXML = ReadDisplayFile("../includes/FusionCharts/dynamic/data/fc_FusionChart4_data.asp")rndFCFusionChart4.Init "FusionChart4", "Column2D", "../includes/FusionCharts/charts/", 400, 400, "", "", "", "", "", ""rndFCFusionChart4.setVersion "1.1.0"rndFCFusionChart4.setConfigXML FusionChart4_dataXMLrndFCFusionChart4.setCategory Recordset1, "jegkannr", "", "", Recordset1_cmdrndFCFusionChart4.addSeries Recordset1, "fk_vurdering_id", "", "color='74423f' seriesName='fk_vurdering_id' renderAs='Column' parentYAxis='P'", "default", "", Recordset1_cmdrndFCFusionChart4.setOrdering "None", "asc"rndFCFusionChart4.prepareDatarn rn%>rn--------------------------------------------------rnThe part of the page: DWFChart.inc.asp, line 378rnrn Private Sub addCategoryDataFromRS() rn Dim category, ind, ckey, cvalue, rs, label_col, cmdrn Set category = categoriesrn ind = 0rn Set rs = category.Item("rs")rn Set cmd = category.Item("cmd")rn label_col = category.Item("label_col")rn rn While (NOT rs.EOF) rn If (category.Exists("value_col")) Thenrn 'if we have a value column defined we use that for the key values in the associative array\rn ckey = rs.Fields.Item(category.Item("value_col")).Valuern cvalue = rs.Fields.Item(label_col).Valuern rn categ_data.Add ckey, cvaluern Elsern 'if we don't have a value column defined we use an index as the category array keyrn ckey = indrn cvalue = rs.Fields.Item(label_col).Valuern rn categ_data.Add ckey, cvaluern ind = ind + 1rn End Ifrn rs.MoveNext()rn WEndrn rn If (InStr(cmd.ActiveConnection, ".mdb")) Thenrn Set rs = cmd.Executern Else rn rs.MoveFirst()rn End Ifrn End Subrn rn Private Function getCategoryDisplayColumn(i)rn rn getCategoryDisplayColumn = NULLrn End Functionrn rnrnCan anyone help me resolve this? I am greatfull for any help...rnrnrn
Cristian Dorobantescu [Extend Studio]

post date:
2009-12-01 03:58:35
Hi Christoffer,Could you please send us at support(at)extendstudio.com a zip with :- database- file you are working on- includes folderThanks,Cristian