Thursday, March 26, 2009 10:16 PMI have the following in a stored procedure:
DECLARE @Query varchar(8000)
SET @Query = N'SELECT * FROM OPENQUERY(SERVER, ''' + REPLACE(@Query, '''', '''''') + ''')'
For some reason Linq won't auto generate a return type. Even if I create a temp table and insert the results of the EXEC into the table and then select from it Linq still refuses to generate a return type.
How can I get this to work?
Saturday, April 18, 2009 10:30 AMI have the same problem. Hopefully you found a solution.
Sunday, April 19, 2009 2:01 AMUnfortunately, nothing will get it to work. The mechanism in SQL Server that provides this information returns nothing when the stored procedure uses a temp table or a dynamic query (via exec). You'll have to specify the signature of the method by hand in the source code.
Wayward LINQ Lacky
Sunday, August 23, 2009 6:02 AMI had the same issue and while editing the dbml file by hand worked fine, the easier 'fix' was to simply comment out the 'exec' line in the stored procedure, then drag the stored procedure into the model, save, then uncomment the exec line in the stored procedure again... of course that is only going to work if the procedure uses a select statement to return the data.