Developer forum

Forum » Ecommerce - Standard features » Error on adding Product Category

Error on adding Product Category

Jesse Bakker
Reply

Hi Guys,

We have a DW solution where we want to include some Product category fields. But when saving the productgroup with the new product category it crashes.
It returns with the following .net error:

[SqlException (0x80131904): The UPDATE statement conflicted with the FOREIGN KEY constraint "EcomGroups$CategoryID". The conflict occurred in database "Dynamicweb-ply", table "dbo.EcomProductCategories", column 'CategoryID'.
The statement has been terminated.]
   System.Data.Common.DbDataAdapter.UpdatedRowStatusErrors(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) +1661008
   System.Data.Common.DbDataAdapter.UpdatedRowStatus(RowUpdatedEventArgs rowUpdatedEvent, BatchCommandInfo[] batchCommands, Int32 commandCount) +53
   System.Data.Common.DbDataAdapter.Update(DataRow[] dataRows, DataTableMapping tableMapping) +2415
   System.Data.Common.DbDataAdapter.UpdateFromDataTable(DataTable dataTable, DataTableMapping tableMapping) +57
   System.Data.Common.DbDataAdapter.Update(DataSet dataSet, String srcTable) +188
   Dynamicweb.Ecommerce.Products.Group.Save(String groupId, String groupLanguageId) +3703
   Dynamicweb.Ecommerce.Products.Group.set_Category(Category Value) +169
   Dynamicweb.Admin.eComBackend.EcomGroupEdit.Save(String languageId) in E:\Agent\_work\94\s\01 - Applications\Dynamicweb.Admin\DW92\Dynamicweb.Admin\Admin\Module\eCom_Catalog\dw7\edit\EcomGroup_Edit.aspx.vb:597
   Dynamicweb.Admin.eComBackend.EcomGroupEdit.RBSave_Click(Object sender, EventArgs e) in E:\Agent\_work\94\s\01 - Applications\Dynamicweb.Admin\DW92\Dynamicweb.Admin\Admin\Module\eCom_Catalog\dw7\edit\EcomGroup_Edit.aspx.vb:824
   Dynamicweb.Controls.RibbonBarButton.RaisePostBackEvent(String eventArgument) +46
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +5062

It's on 9.2.16, and recently upgraded coming from 8.9. 

Any suggestions?

BR, Jesse

 


Replies

 
Morten Bengtson Dynamicweb Employee
Morten Bengtson
Reply

Hi Jesse,

Looks like something went wrong during the upgrade to DW9. The table "EcomProductCategories" is not used by DW9 and I'm pretty sure the EcomGroups$CategoryID constraint is wrong as well.

Did you follow the steps for upgrading? http://doc.dynamicweb.com/releases-and-downloads/releases/upgrading/upgrading-to-dynamicweb-9
You probably missed the "Prepare database" step.

Best regards,
Morten

 

You must be logged in to post in the forum