troubleshooting Question

Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints

Avatar of newbie27
newbie27Flag for United Kingdom of Great Britain and Northern Ireland asked on
Microsoft SQL Server.NET ProgrammingASP.NETMicrosoft SQL Server 2005SQL
22 Comments4 Solutions1376 ViewsLast Modified:
Hello Experts,

I am doing a query to the DB to return last week web orders and produce a CSV file for the reporting.

All I have done now, is created a View using the query below and defined a dataset (XSD) to pull these records...

When I have records with more than one orderID its giving me an error in the ASP.net script

error:

System.Data.ConstraintException: Failed to enable constraints. One or more rows contain values violating non-null, unique, or foreign-key constraints.


please can someone advise how to bypass this exception in ASP.NET?

thanks
s
ASKER CERTIFIED SOLUTION
Arthur_Wood

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 4 Answers and 22 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 4 Answers and 22 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros