“/”应用程序中的服务器错误。

从数据类型 varchar 转换为 numeric 时出错。

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

异常详细信息: System.Data.OleDb.OleDbException: 从数据类型 varchar 转换为 numeric 时出错。

源错误:


行 151:        }
行 152:        OleDbCommand cmd1 = CreateSQLCommand("select id,c_kind_name,c_linkurl,(select count(*) from t_info_kind a where a.c_sj=b.id and a.c_kind_num='是') as summ,c_kind_num from t_info_kind b where c_sj='" + c_kind2 + "' and c_kind_num='是' and id<>'110' order by n_order asc,id asc");
行 153:        dr1 = cmd1.ExecuteReader(CommandBehavior.CloseConnection);
行 154:
行 155:    }

源文件: d:\web\hzggzxc2020\Controllers\incc_left.ascx.cs    行: 153

堆栈跟踪:


[OleDbException (0x80040e07): 从数据类型 varchar 转换为 numeric 时出错。]
   System.Data.OleDb.OleDbDataReader.ProcessResults(OleDbHResult hr) +51
   System.Data.OleDb.OleDbDataReader.NextResult() +413
   System.Data.OleDb.OleDbCommand.ExecuteReaderInternal(CommandBehavior behavior, String method) +236
   System.Data.OleDb.OleDbCommand.ExecuteReader(CommandBehavior behavior) +112
   incc_left.Page_Load(Object sender, EventArgs e) in d:\web\hzggzxc2020\Controllers\incc_left.ascx.cs:153
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +43
   System.Web.UI.Control.OnLoad(EventArgs e) +91
   System.Web.UI.Control.LoadRecursive() +74
   System.Web.UI.Control.LoadRecursive() +163
   System.Web.UI.Control.LoadRecursive() +163
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2604


版本信息: Microsoft .NET Framework 版本:2.0.50727.5420; ASP.NET 版本:2.0.50727.5420