0

I'm having issues with updating a select stored procedure in the model browser. Deleting the function import and proc isn't updating the object correctly. What's happening is that when I remap it, it says the function returns no columns. I execute it in SQL, and it returns data with the associated columns just fine.

I don't understand why EF is having problems; I was able to map originally the correct way. When deleting the complex object

Found this similar issue, but I am not using dynamic SQL. I am using a function though: Entity Framework 4: The selected stored procedure returns no columns

Any ideas?

Community
  • 1
  • 1
Brian Mains
  • 50,520
  • 35
  • 148
  • 257
  • I had this problem before too. If i remember correctly, i just re-created the SP under another name, then imported that, and it worked. – RPM1984 Dec 20 '10 at 20:39

1 Answers1

2

I'm assuming that you are allowing the entity modeler to generate the complex type for you based on the results of the stored procedure. In your stored procedure, try adding SET FMTONLY OFF before you do the final select of your result set. Then, at the end of the procedure, SET FMTONLY ON. You can remove both statements once the entity modeler has generated your complex type. More information in this question.

Community
  • 1
  • 1
AJ.
  • 16,368
  • 20
  • 95
  • 150