null exception on a project


https://forum.kartris.com/Topic7130.aspx
Print Topic | Close Window

By SAbow - Mon 24 Jun 2019
we are using the latest version of Kartris for one of our project and after working and making adjustments to the database and code we are getting this error when trying to load product page
"System.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints."

please advice what can be that cause this error.
By Paul - Tue 25 Jun 2019
Need to try to debug where in the code it's happening. It suggests data is being pulled, maybe into an adapter, but that constraints that expect certain values to be unique are violated by the data, e.g. there may be two items with the same IDs.

Using debug on the page, or possibly errors from the screen, you should be able to narrow down the actual call that is failing, and we should be able to identify the cause. Once we have more info, it's normally possible to query the data directly and then figure out how to fix it.
By SAbow - Tue 25 Jun 2019
there are no more details given when we debug. this is happening randomly. When we run the queries directly in SQL or preview the data in the xsd file it runs fine. there are no duplicate IDs - and this is happening even when there is only one row in the result set!!