I've got a small database with a single table and with a view. The view is coming from a different database (i.e, it does select * from db.dbo.someTable). I can select from the view fine using a query. When I try to add the view using "Update Model from
Database", the wizard opens, I check my view under the views branch of the tree and click finish. The wizard goes away but the view is never added.
If I update again, I can still see the view under the "Add" portion of the wizard (not under refresh). No matter how many times I add it, it never actually adds and no errors pop up.
Also, as an interesting side note... if I close my EDMX window I cannot open it back up from the solution explorer. Double clicking on it simply expands the node. I have to restart studio to get it to work again.
Anyone seen this? The user who is adding the view is pretty restricted - the only thing it can do is select * from the view. Are there special permissions the user needs to use the model designer?
Member
11 Points
28 Posts
Add view to EDMX produces no results
Oct 29, 2008 11:04 AM|rscott|LINK
I've got a small database with a single table and with a view. The view is coming from a different database (i.e, it does select * from db.dbo.someTable). I can select from the view fine using a query. When I try to add the view using "Update Model from Database", the wizard opens, I check my view under the views branch of the tree and click finish. The wizard goes away but the view is never added.
If I update again, I can still see the view under the "Add" portion of the wizard (not under refresh). No matter how many times I add it, it never actually adds and no errors pop up.
Also, as an interesting side note... if I close my EDMX window I cannot open it back up from the solution explorer. Double clicking on it simply expands the node. I have to restart studio to get it to work again.
Anyone seen this? The user who is adding the view is pretty restricted - the only thing it can do is select * from the view. Are there special permissions the user needs to use the model designer?
None
0 Points
2 Posts
Re: Add view to EDMX produces no results
Jan 10, 2009 02:40 AM|CraigFisher|LINK
None
0 Points
9 Posts
Re: Add view to EDMX produces no results
Aug 20, 2009 06:44 AM|Mulhall|LINK
Same problem here.
Used update model from database > add > all views
Update "Successfully registered the assembly...", no errors
Only one view of three was added, no errors. Tried again. "Sucessful...", no errors, no views added.
Was this ever resolved or do I have to delete and recreate the edmx everytime I make changes to the database?
None
0 Points
9 Posts
Re: Add view to EDMX produces no results
Aug 21, 2009 09:01 AM|Mulhall|LINK
I have no idea why errors aren't being reported, but just to post a solution for others following the same path:
You need to have columns in your view that are not nullable to allow the EDM to infer a key.
Browse the Model > Entity Types > View > Select the column you want and in the properties set Nullable to False.