开发者

Entity Framework Stored Procedures and INFORMATION_SCHEMA views

I have a stored procedure that pulls metadata from the INFORMATATION_SCHEMA views in SQL Server from another database. With EF, I'm getting the error:

"the selected stored procedures returns no columns"

Naturally, I remem开发者_高级运维bered the SET FMTONLY OFF command, but this did not work. Turning it on didn't work either (I know EF does this, but it was worth a shot :-)).

Anyway, what actually finally did work is inserting the results into a table variable, and selecting the results of the table variable. However, it didn't work with a table variable when SET FMTONLY OFF was set; it only works with a table variable when this statement is omitted, hence it's turned on by EF.

That is very, very strange, and I don't want to have to use a table variable. That seems foolish to have to do it. Is there any other way?

Thanks.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜