Entity Framework-No stored procedure columns returned

My stored procedure returns temporary table with data. I am not able to import schema when importing stored procedure using entity framework and it returns "No Columns Returned". 

RajKumar | Answered# (13)
Reply For This Question
Answer(s) Posted
[Solved] Entity Framework - No stored procedure columns returned

Entity framework will not support importing stored procedure which is result set of "Dynamic Query" and "Temp Table".

In order to import the schema of the Stored procedure, entity framework need to execute the SP to yield the schema of the result set.

In this case, Using "SET FMTONLY OFF" will execute the stored procedure and get the column details with out execute the logic.

Usage:

Create Procedure SampleProcedure

AS

BEGIN

SET FMTONLY OFF

<<Your SP Logic>>

END

Note: After importing SP Schema successfully, use SET FMTONLY ON (or) Remove the SET FMTONLY OFF and execute the procedure to make it normal.

Raj Kumar | Answered# (13)
Post Your Answer
   Please login to post your answer.
  Member Login
  Email Address  
  Password  
   Sign Up?  
  Privacy   Terms Of Use   Contact Us
© 2016 Developerin.Net. All rights reserved.
Trademarks and Article Images mentioned in this site may belongs to Microsoft and other respective trademark owners.
Articles, Tutorials and all other content offered here is for educational purpose only and its author copyrights.