Last post Feb 06, 2020 04:36 PM by mj1223
Feb 05, 2020 04:53 PM|mj1223|LINK
I recently made a change to a project by adding a view. After publishing the project to our development server for testing, parts that were working started throwing errors. It was then that I noticed that for some reason many of my stored procedures
were no longer listed in the model browser. They were still listed under VHRCModel > Complex Types, and Function Imports but were not listed under VHRCModel.Store > Stored Procedures / Functions
The only change on my system that I am aware of is a recent update of the OS of my machine from Win 7 pro to Win 10 pro.
I Deleted the references to the procedures in the places they were listed and then clicked on Update Model from Database again and added the procedures that I had noticed were missing. I then noticed that many more were missing as well and decided to get
a fresh start and just delete the entire edmx from the project and then reinstall all of the tables and procedures that I need for this project.
Which brings me to where I am right now. One of the tables did not get added. And EVERY time i try to update the model from database to add the table it does not add and I see this in my Error List
Error 6004: The table 'VHRC.dbo.AllowedRestrictedAssessments' is referenced by a relationship, but cannot be found. VHRC C:\Users\miranda\Documents\Visual Studio 2015\Projects\VHRC\VHRC\Models\VHRC.edmx
I have tried over a dozen times to add that table but after adding and then building it is still not listed. It is a simple foreign key table used to hold the keys of 2 other tables so I added a class for it, but it still shows that error. Why? Why
will it not add the table and why does it show the error?
While I am at it why did the stored procedures disappear from the project? No one else in the company has access to this project.
Feb 05, 2020 07:47 PM|mgebhard|LINK
Check primary and foreign keys for errors. Do you have a typo or perhaps the key allows NULLs?
Feb 06, 2020 04:36 PM|mj1223|LINK
Thanks . I don't know why the development version of the db is different than our production version as far as the primary key on one of the tables. But it is. That explains why it wouldn't load the table.