参数化查询 '(@product_id int,@product_type int,@product_p' 需要参数 @product_price,但未提供该参
参数化查询 '(@product_id int,@product_type int,@product_count int,@product_p' 需要参数 @product_price,但未提供该参数。
说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。
异常详细信息: System.Data.SqlClient.SqlException: 参数化查询 '(@product_id int,@product_type int,@product_count int,@product_p' 需要参数 @product_price,但未提供该参数。
源错误:
行 164: catch (Exception)
行 165: {
行 166: throw;
行 167: }
行 168: finally
源文件: F:\sx\cs\DAl\example\ProductDAL.cs 行: 166
堆栈跟踪:
[SqlException (0x80131904): 参数化查询 '(@product_id int,@product_type int,@product_count int,@product_p' 需要参数 @product_price,但未提供该参数。]
System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1950890
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4846875
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) +204
System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +954
System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +162
System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +175
System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +137
DAL.example.ProductDAL.UpdateProduct(Product product) in F:\sx\cs\DAl\example\ProductDAL.cs:166
example_ProductUpdate.btUpdate_Click(Object sender, EventArgs e) in f:\sx\cs\web\example\ProductUpdate.aspx.cs:53
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +36
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565
--------------------------------------------------------------------------------
版本信息: Microsoft .NET Framework 版本:2.0.50727.3082; ASP.NET 版本:2.0.50727.3082