Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

update model from database

Posted on 2010-09-10
4
Medium Priority
?
708 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 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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

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…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …

705 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