Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Failed to Enable Constraints
Message
De
01/12/2006 12:52:15
Jeff Corder
Ambit Technologies, LLC
Missouri, États-Unis
 
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
OS:
Windows XP SP2
Database:
MS SQL Server
Divers
Thread ID:
01173507
Message ID:
01174166
Vues:
6
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform