Click here to Skip to main content
15,890,399 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
[DataConnection.HandleError]: 

Query: 
INSERT INTO COM_ShoppingCart ([ShoppingCartGUID], [ShoppingCartUserID], [ShoppingCartSiteID], [ShoppingCartLastUpdate], [ShoppingCartCurrencyID], [ShoppingCartPaymentOptionID], [ShoppingCartShippingOptionID], [ShoppingCartBillingAddressID], [ShoppingCartShippingAddressID], [ShoppingCartCustomerID], [ShoppingCartNote], [ShoppingCartCompanyAddressID], [ShoppingCartCustomData], [ShoppingCartContactID], [ShoppingCartCampaignID], [ShoppingCartProgramID], [ShoppingCartDistributorID], [ShoppingCartInventoryType], [BusinessUnitIDForDistributor], [ShoppingCartRequestedDeliveryDate], [ShoppingCartCarrierAccountNumber], [ShoppingCartFranchiseNumber], [ShoppingCartStoreID]) 
VALUES (@ShoppingCartGUID, @ShoppingCartUserID, @ShoppingCartSiteID, @ShoppingCartLastUpdate, @ShoppingCartCurrencyID, @ShoppingCartPaymentOptionID, @ShoppingCartShippingOptionID, @ShoppingCartBillingAddressID, @ShoppingCartShippingAddressID, @ShoppingCartCustomerID, @ShoppingCartNote, @ShoppingCartCompanyAddressID, @ShoppingCartCustomData, @ShoppingCartContactID, @ShoppingCartCampaignID, @ShoppingCartProgramID, @ShoppingCartDistributorID, @ShoppingCartInventoryType, @BusinessUnitIDForDistributor, @ShoppingCartRequestedDeliveryDate, @ShoppingCartCarrierAccountNumber, @ShoppingCartFranchiseNumber, @ShoppingCartStoreID);

SELECT SCOPE_IDENTITY() AS [ID]

Caused exception: 
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_COM_ShoppingCart_ShoppingCartCustomerID_COM_Customer". The conflict occurred in database "K11_KDA_QA", table "dbo.COM_Customer", column 'CustomerID'.
The statement has been terminated.


What I have tried:

[DataConnection.HandleError]: 

Query: 
INSERT INTO COM_ShoppingCart ([ShoppingCartGUID], [ShoppingCartUserID], [ShoppingCartSiteID], [ShoppingCartLastUpdate], [ShoppingCartCurrencyID], [ShoppingCartPaymentOptionID], [ShoppingCartShippingOptionID], [ShoppingCartBillingAddressID], [ShoppingCartShippingAddressID], [ShoppingCartCustomerID], [ShoppingCartNote], [ShoppingCartCompanyAddressID], [ShoppingCartCustomData], [ShoppingCartContactID], [ShoppingCartCampaignID], [ShoppingCartProgramID], [ShoppingCartDistributorID], [ShoppingCartInventoryType], [BusinessUnitIDForDistributor], [ShoppingCartRequestedDeliveryDate], [ShoppingCartCarrierAccountNumber], [ShoppingCartFranchiseNumber], [ShoppingCartStoreID]) 
VALUES (@ShoppingCartGUID, @ShoppingCartUserID, @ShoppingCartSiteID, @ShoppingCartLastUpdate, @ShoppingCartCurrencyID, @ShoppingCartPaymentOptionID, @ShoppingCartShippingOptionID, @ShoppingCartBillingAddressID, @ShoppingCartShippingAddressID, @ShoppingCartCustomerID, @ShoppingCartNote, @ShoppingCartCompanyAddressID, @ShoppingCartCustomData, @ShoppingCartContactID, @ShoppingCartCampaignID, @ShoppingCartProgramID, @ShoppingCartDistributorID, @ShoppingCartInventoryType, @BusinessUnitIDForDistributor, @ShoppingCartRequestedDeliveryDate, @ShoppingCartCarrierAccountNumber, @ShoppingCartFranchiseNumber, @ShoppingCartStoreID);

SELECT SCOPE_IDENTITY() AS [ID]

Caused exception: 
The INSERT statement conflicted with the FOREIGN KEY constraint "FK_COM_ShoppingCart_ShoppingCartCustomerID_COM_Customer". The conflict occurred in database "K11_KDA_QA", table "dbo.COM_Customer", column 'CustomerID'.
The statement has been terminated.
Posted
Updated 4-Dec-19 4:16am

1 solution

You are trying to insert a cart for a customer which doesn't exist in your COM_Customer table.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900