Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Failed to Enable Constraints
Message
From
01/12/2006 12:52:15
Jeff Corder
Ambit Technologies, LLC
Missouri, United States
 
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Environment versions
OS:
Windows XP SP2
Database:
MS SQL Server
Miscellaneous
Thread ID:
01173507
Message ID:
01174166
Views:
5
It turns out the problem was that there was no unique primary key in the View. The query ran fine in Query Analyzer and I could use it to retrieve a Table and DataReader UNTIL I set the MissingSchemaAction to AddWithKey.

After hunting and tracing through MM I found that the PrimaryKey was set by the Adapter to the PrimaryKey(s) in the View. It turned out that the only primary key retrieved in the View was not unique in the view. I added another primary key and the Adapter saw both of them and the combined key was unique. The PrimaryKey set in the business object was not used (as near as I can tell). I had tried adding a new column to the view NewID() AS PK but it was ignored.

Thanks for the help,
Jeff
Previous
Reply
Map
View

Click here to load this message in the networking platform