content:[11:32:28] -------------------------------------------------------------
CODE:O1132284
Error:14_2627_1_-2146232060
SQL:RB_Product_ADDNew = ,'0','1','16647715','2','https://www.amazon.co.uk/dp/B09NXJ9X9P/ref=sspa_dk_detail_3?pd_rd_i=B09NXJ9X9P&pd_rd_w=bB5y1&content-id=amzn1.sym.15c0cc83-c6c5-4d44-aa3d-0de17a9f3682&pf_rd_p=15c0cc83-c6c5-4d44-aa3d-0de17a9f3682&pf_rd_r=62FXA6PM15PHXKS8SWEY&pd_rd_wg=NHCoP&pd_rd_r=37d4e947-3827-45e5-b3b9-29d0c2befefc&s=kitchen&sp_csd=d2lkZ2V0TmFtZT1zcF9kZXRhaWw&th=1','','','8寸双孔面碗四件套(8寸双孔绿锦鲤猫碗+元宝筷架-孔雀绿+汤匙-孔雀绿+木制日式筷子)','','1','382','0','0','0','2000/1/1 0:00:00','2000/1/1 0:00:00','4429','4355','4405','0','0.00','0.00','0','0','https://irobotbox-hd1.oss-cn-hangzhou.aliyuncs.com/1/ProductImages/16647715/2023/4/14/25f75d225e5d49388cac321ca83f92fb/508a973c-f114-4345-6e8c-485e8e9f6856.jpg','10.00','50.00','0.00','0.00','0.00','0.00','0.00','0.00','','','','','<strong>Description</strong><br />
<br />
<strong>Features</strong><br />
<br />
-Color:<br />
-Material:<br />
-Size:','','','Set','1','','False','2000/1/1 0:00:00','26.000','0.00','As Shown','','0.000','-1','','','','0','2023/4/14 11:32:28',null,null,'True','','0','0','0',null,'0.0000','0.0000','0.0000','0','0.00','0.00','0','1','0','5','1','3','4355_4405_4429','双孔面碗套装','0',null,'1','陶瓷','0','False','False','','尺寸1','8寸双孔面碗四件套(8寸双孔绿锦鲤猫碗+元宝筷架-孔雀绿+汤匙-孔雀绿+木制日式筷子)','False','','0',''
MESSAGE:Violation of PRIMARY KEY constraint 'PK_RB_Product'. Cannot insert duplicate key in object 'dbo.RB_Product'. The duplicate key value is (1, 16647715).
The statement has been terminated.
0
TRACE: 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted)
在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest)
在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
在 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
在 System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
在 GotDotNet.ApplicationBlocks.Data.AdoHelper.ExecuteNonQuery(IDbCommand command)
在 GotDotNet.ApplicationBlocks.Data.AdoHelper.ExecuteNonQuery(IDbConnection connection, CommandType commandType, String commandText, IDataParameter[] commandParameters)
在 GotDotNet.ApplicationBlocks.Data.AdoHelper.ExecuteNonQuery(String connectionString, CommandType commandType, String commandText, IDataParameter[] commandParameters)
在 GotDotNet.ApplicationBlocks.Data.AdoHelper.ExecuteNonQuery(String connectionString, String spName, Object[] parameterValues)
在 Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(String connectionString, String spName, Object[] parameterValues)
在 PandaBuy.ERP.DAL.DBOperator.ExecuteADDSP(List`1 p_Body, String spName, String conn, SqlTransaction tran) 在 PandaBuy.ERP.DAL.DBOperator.E8mARE5em(SqlException , String )
在 PandaBuy.ERP.DAL.DBOperator.ExecuteADDSP(List`1 p_Body, String spName, String conn, SqlTransaction tran)
在 Dsword.Common.ProductClass.Product_ADDNew(RB_Product model_RB_Product)
在 PandaBuy.ERP.Web.IrobotBox.Product.ProductEdit.AddProductNew()
在 PandaBuy.ERP.Web.IrobotBox.Product.ProductEdit.ButtonSave_Click(Object sender, EventArgs e)
在 System.Web.UI.HtmlControls.HtmlInputButton.OnServerClick(EventArgs e)
在 System.Web.UI.HtmlControls.HtmlInputButton.RaisePostBackEvent(String eventArgument)
在 System.Web.UI.HtmlControls.HtmlInputButton.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)
在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
在 System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
在 System.Web.UI.Page.ProcessRequest()
在 System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context)
在 System.Web.UI.Page.ProcessRequest(HttpContext context)
在 ASP.irobotbox_product_productedit_aspx.ProcessRequest(HttpContext context)
在 System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
在 System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
在 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
在 System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception error)
在 System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)
在 System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)
在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
在 System.Web.Hosting.UnsafeIISMethods.MgdIndicateCompletion(IntPtr pHandler, RequestNotificationStatus& notificationStatus)
在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
在 System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr rootedObjectsPointer, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)
-------------------------------------------------------------
重现步骤
这个是获取最大ID的存储过程没有加行锁导致ID重复的,需要修改 sp_GetIncrementID存储过程,DBA执行一下这个脚本