开发者

Entity Framework Stored Procedures and INFORMATION_SCHEMA views

开发者 https://www.devze.com 2023-03-20 05:07 出处:网络
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:

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

精彩评论

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

关注公众号