Solved

update model from database

Posted on 2010-09-10
4
702 Views
Last Modified: 2013-11-27
Hi experts, I can not update the model. edmx file from visual studio. I upgraded a stored  procedure in the database (add 2 parameters) and I can not give yourself visual studio upgrade. I get success message, but I can not update
Here's how
1. right click on the file. edmx file
2. select updating model
3. update tab select the stored procedure
4. I press end
5. the procedure is not updated in the model

i am using visual studio 2008
usp.jpg
modelEXPLORER.jpg
0
Comment
Question by:enrique_aeo
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 29

Expert Comment

by:Gautham Janardhan
ID: 33653250
are you referring to the function ?  was the return type of the stored proc changed ?
0
 
LVL 59

Accepted Solution

by:
Kevin Cross earned 250 total points
ID: 33653255
Hmmmm.  Worked fine for me, but I am using VS 2010.  Just in case, this is what I did (which to me seems like what you did -- but listing out in case you catch something).

(1) Updated Stored Procedure Parameter Definition in SQL Server
(2) Opened Entity Model Browser
(3) Right-click on {model file name}.edmx or {ModelName}.Store
(4) Select Update Model from Database
(5) Click on Refresh tab
(6) Expanded Stored Procedure and highlighted {procedure name} OR highlight Stored Procedures (updates all)
(7) Click Finish

Got these results:
Generated model file: Model1.edmx.
Loading metadata from the database took 00:00:03.6419677.
Generating the model took 00:00:01.5014046.

After that, using Model Browser, the changes to my procedure parameters are now visible in VS.
0
 
LVL 29

Assisted Solution

by:Gautham Janardhan
Gautham Janardhan earned 250 total points
ID: 33653277
The function import wont get updated automatically on refreshing the model. You will have to delete the function import and then add a new one so that the new parameters will be recognised by the entity container
0
 

Author Closing Comment

by:enrique_aeo
ID: 33654653
Thanks experts, if we look closely the graph if the parameter is added, only the alphabetically ordered by visualization studio
0

Featured Post

Secure Your Active Directory - April 20, 2017

Active Directory plays a critical role in your company’s IT infrastructure and keeping it secure in today’s hacker-infested world is a must.
Microsoft published 300+ pages of guidance, but who has the time, money, and resources to implement? Register now to find an easier way.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question