Information générale
Catégorie:
The Mere Mortals .NET Framework
Versions des environnements
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement