说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。

异常详细信息: System.InvalidOperationException: 不允许更改“ConnectionString”属性。连接的当前状态为正在连接。

源错误:


行 19:         {
行 20:             cid = Request.QueryString["cid"].ToString();
行 21:             ZS = bll.SelectPid(Convert.ToInt32(cid)).Count;
行 22:             Cto(Convert.ToInt32(cid));
行 23:             list = bll2.Select(Convert.ToInt32(cid));

源文件: f:\usr\localuser\hmw235228\New_8.aspx.cs    行: 21

堆栈跟踪:


[InvalidOperationException: 不允许更改“ConnectionString”属性。连接的当前状态为正在连接。]
   System.Data.Odbc.OdbcConnection.ConnectionString_Set(String value) +1157275
   System.Data.Odbc.OdbcConnection.set_ConnectionString(String value) +4
   DAL.DBUtil.get_Conn() in i:\网站建设\汉邦\HB\DAL\DBUtil.cs:23
   DAL.SqlHelper.GetDataTable(String cmdText, CommandType cmdType, OdbcParameter[] parameters, String srcTable) in i:\网站建设\汉邦\HB\DAL\SqlHelper.cs:134
   DAL.Dal_other.GetObjects(String cmdText, CommandType cmdType, OdbcParameter[] parameters) in i:\网站建设\汉邦\HB\DAL\Dal_other.cs:103
   DAL.Dal_other.SelectPid(Int32 pid) in i:\网站建设\汉邦\HB\DAL\Dal_other.cs:65
   BLL.Bll_other.SelectPid(Int32 pid) in i:\网站建设\汉邦\HB\BLL\Bll_other.cs:35
   New_8.Page_Load(Object sender, EventArgs e) in f:\usr\localuser\hmw235228\New_8.aspx.cs:21
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
   System.Web.UI.Control.OnLoad(EventArgs e) +99
   System.Web.UI.Control.LoadRecursive() +50
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627


版本信息: Microsoft .NET Framework 版本:2.0.50727.8669; ASP.NET 版本:2.0.50727.5491