Server Error in '/' Application.

SELECT  count(fld_id) as Scount  FROM tbl_train where fld_id=fld_id and fld_unitID=470 <br>There is already an open DataReader associated with this Command which must be closed first.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Exception: SELECT  count(fld_id) as Scount  FROM tbl_train where fld_id=fld_id and fld_unitID=470 <br>There is already an open DataReader associated with this Command which must be closed first.

Source Error:


Line 64:             catch (Exception ex)
Line 65:             {
Line 66:                 throw new Exception(sqlStr + " <br>" + ex.Message);
Line 67:             }
Line 68:             finally

Source File: c:\WebServer\areeg\App_Code\Cdb.cs    Line: 66

Stack Trace:


[Exception: SELECT  count(fld_id) as Scount  FROM tbl_train where fld_id=fld_id and fld_unitID=470 <br>There is already an open DataReader associated with this Command which must be closed first.]
   Cdb.OleExecDataSet(String sqlStr) in c:\WebServer\areeg\App_Code\Cdb.cs:66
   Train.selectCount(String gradeID, String SubID, String UnitID, String ChapID, String SubChap) in c:\WebServer\areeg\App_Code\Train.cs:277
   Control_Second.GetTrainCounter(String GradeID, String SubID, String UnitID, String ChapID, String SubChap) in c:\WebServer\areeg\Control\ShowSecond.ascx.cs:144
   ASP.control_showsecond_ascx.__DataBind__control11(Object sender, EventArgs e) in c:\WebServer\areeg\Control\ShowSecond.ascx:340
   System.Web.UI.Control.OnDataBinding(EventArgs e) +100
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +178
   System.Web.UI.Control.DataBindChildren() +248
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +195
   System.Web.UI.WebControls.DataList.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +175
   System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +885
   System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +89
   System.Web.UI.Control.DataBindChildren() +248
   System.Web.UI.Control.DataBind(Boolean raiseOnDataBinding) +195
   System.Web.UI.WebControls.DataList.CreateItem(Int32 itemIndex, ListItemType itemType, Boolean dataBind, Object dataItem) +175
   System.Web.UI.WebControls.DataList.CreateControlHierarchy(Boolean useDataSource) +885
   System.Web.UI.WebControls.BaseDataList.OnDataBinding(EventArgs e) +89
   Control_Second.Fill() in c:\WebServer\areeg\Control\ShowSecond.ascx.cs:40
   Control_Second.Page_Load(Object sender, EventArgs e) in c:\WebServer\areeg\Control\ShowSecond.ascx.cs:31
   System.Web.UI.Control.OnLoad(EventArgs e) +108
   System.Web.UI.Control.LoadRecursive() +90
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Control.LoadRecursive() +185
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1533


Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.8.4110.0