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

在将 nvarchar 值 '30_6' 转换成数据类型 int 时失败。

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

异常详细信息: System.Data.SqlClient.SqlException: 在将 nvarchar 值 '30_6' 转换成数据类型 int 时失败。

源错误:

执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息。

堆栈跟踪:


[SqlException (0x80131904): 在将 nvarchar 值 '30_6' 转换成数据类型 int 时失败。]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +212
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +245
   System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2843
   System.Data.SqlClient.SqlDataReader.HasMoreRows() +266
   System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout) +278
   System.Data.SqlClient.SqlCommand.CompleteExecuteScalar(SqlDataReader ds, Boolean returnSqlValue) +50
   System.Data.SqlClient.SqlCommand.ExecuteScalar() +208
   DAL.SQLHelper.ExecuteScalar(SqlConnection connection, SqlTransaction transaction, CommandType commandType, String commandText, SqlParameter[] commandParameters) +177
   DAL.SQLHelper.ExecuteScalar(SqlConnection connection, CommandType commandType, String commandText, SqlParameter[] commandParameters) +86
   DAL.SQLHelper.ExecuteScalar(String connectionString, CommandType commandType, String commandText, SqlParameter[] commandParameters) +211
   DAL.WebTypeDAO.SelectTitle(String id) +257
   BLL.WebType.SelectTitle(String p) +117
   Web.place.DestinationList.Page_Load(Object sender, EventArgs e) +1535
   System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +25
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +42
   System.Web.UI.Control.OnLoad(EventArgs e) +132
   System.Web.UI.Control.LoadRecursive() +66
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +2428


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