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

在将 varchar 值 '   p_obj[i].Pr_Id   ' 转换成数据类型 int 时失败。

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

异常详细信息: System.Data.SqlClient.SqlException: 在将 varchar 值 '   p_obj[i].Pr_Id   ' 转换成数据类型 int 时失败。

源错误:


行 128:            catch (Exception)
行 129:            {
行 130:                throw;
行 131:            }
行 132:        }

源文件: d:\wwwroot\fcyzxjzp2018\wwwroot\App_Code\SqlHelper.cs    行: 130

堆栈跟踪:


[SqlException (0x80131904): 在将 varchar 值 '   p_obj[i].Pr_Id   ' 转换成数据类型 int 时失败。]
   System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +2564502
   System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) +5976684
   System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) +285
   System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) +4169
   System.Data.SqlClient.SqlDataReader.TryHasMoreRows(Boolean& moreRows) +240
   System.Data.SqlClient.SqlDataReader.TryReadInternal(Boolean setTimeout, Boolean& more) +268
   System.Data.SqlClient.SqlDataReader.Read() +34
   System.Data.Common.DataAdapter.FillLoadDataRow(SchemaMapping mapping) +211
   System.Data.Common.DataAdapter.FillFromReader(DataSet dataset, DataTable datatable, String srcTable, DataReaderContainer dataReader, Int32 startRecord, Int32 maxRecords, DataColumn parentChapterColumn, Object parentChapterValue) +197
   System.Data.Common.DataAdapter.Fill(DataSet dataSet, String srcTable, IDataReader dataReader, Int32 startRecord, Int32 maxRecords) +410
   System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +218
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +136
   System.Data.Common.DbDataAdapter.Fill(DataSet dataSet) +88
   SqlHelper.executeDataAdapter(String cmdText, CommandType cmdType, SqlParameter[] para) in d:\wwwroot\fcyzxjzp2018\wwwroot\App_Code\SqlHelper.cs:130
   Product.getidproduct(String Pr_Id) in d:\wwwroot\fcyzxjzp2018\wwwroot\App_Code\Product.cs:83
   ProductDetail.Page_Load(Object sender, EventArgs e) in d:\wwwroot\fcyzxjzp2018\wwwroot\productdetail.aspx.cs:20
   System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +51
   System.Web.UI.Control.OnLoad(EventArgs e) +95
   System.Web.UI.Control.LoadRecursive() +59
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +678


版本信息: Microsoft .NET Framework 版本:4.0.30319; ASP.NET 版本:4.7.3770.0
Baidu
sogou