Solved

update model from database

Posted on 2010-09-10
4
690 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
  • 2
4 Comments
 
LVL 29

Expert Comment

by:Gautham Janardhan
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks experts, if we look closely the graph if the parameter is added, only the alphabetically ordered by visualization studio
0

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

743 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now