Home Dashboard Directory Help
Search

Entity framework sql server stored proc import issue by meyerovb


Status: 

Closed


1
0
Sign in
to vote
Type: Bug
ID: 774366
Opened: 12/14/2012 7:33:08 AM
Access Restriction: Public
1
Workaround(s)
view
0
User(s) can reproduce this bug

Description

Entity framework cannot import this proc:

CREATE PROC dbo.TEST AS
BEGIN
    SELECT 1
    SELECT 1 a INTO #a
    ALTER TABLE #a ADD PRIMARY KEY(a)    
END
Details
Sign in to post a comment.
Posted by meyerovb on 8/8/2013 at 1:22 PM
How about making the error message more descriptive at least?
Posted by Microsoft on 8/8/2013 at 1:16 PM
Hi, The issue is that the result set of 'SELECT 1' doesn't have column names. If you did 'SELECT 1 AS MyColumn' this would work. EF does mapping based on column names so we aren't planning to support un-named columns.
Posted by Microsoft on 12/17/2012 at 1:01 AM
Thanks for your feedback.

We are rerouting this issue to the appropriate group within the Visual Studio Product Team for triage and resolution. These specialized experts will follow-up with your issue.
Posted by Microsoft on 12/14/2012 at 7:50 AM
Thank you for your feedback, we are currently reviewing the issue you have submitted. If this issue is urgent, please contact support directly(http://support.microsoft.com)
Sign in to post a workaround.
Posted by meyerovb on 12/14/2012 at 7:34 AM
Make sure any output select statements name all columns.

In the posted example, change

SELECT 1

to

SELECT 1 col1