General information
Category:
The Mere Mortals .NET Framework
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only