Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

update model from database

Posted on 2010-09-10
4
Medium Priority
?
714 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
ID: 33653250
are you referring to the function ?  was the return type of the stored proc changed ?
0
 
LVL 60

Accepted Solution

by:
Kevin Cross earned 1000 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 1000 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Introduction This article shows how to use the open source plupload control to upload multiple images. The images are resized on the client side before uploading and the upload is done in chunks. Background I had to provide a way for user…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

926 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